Skip to content

Instantly share code, notes, and snippets.

View nasikshafeek's full-sized avatar

Nasik Shafeek nasikshafeek

View GitHub Profile
@nasikshafeek
nasikshafeek / mvdir.sh
Last active July 2, 2016 11:32
Bash script to move file or directories by creating a directory if the target directory does not exist.
#!/bin/bash
# mvdir file path/to/folder
# Condition to test whether there are 2 input
# And condtition to test whether first parameter is a file/directory
if [ $# -eq 2 ] && [ -e $1 ]
then
file=$1;
targetPath=$2;