rsync -av dir1 firstname.lastname@example.org:/path/to/dir1
cp -av file1*.txt file2*.txt /path/to/dest
I need to correct those command as follows:
rsync -av dir5 email@example.com:/path/to/dir1
cp -av delta1*.txt delta2*.txt /path/to/dest
How do I replace dir1 with dir5 or file with delta and repeat the last command under bash shell?
I‘m writing a bash wrapper script that will pass arguments to the command. I need to find out the last argument if I call the wrapper as follows:
./wrapper -a -b –longarg=foo thisfilename.txt
./wrapper -a -b thisfilename.txt
./wrapper -a –next=true thisfilename.txt
I want thisfilename.txt stored in a shell variable called $last. How do I find the last argument passed to a shell script written in bash or ksh under Unix like operating systems?
I’d like to replace / and : with _. I’m aware of the following sed command:
> s/:/_/g’ <<<"$_now"
How do I specify two pattern within the same sed command to replace | and : with _ so that I can get output as 01_20_12_16_10_42?