I have a line in my bash script that goes like this:
cp -v /temp1/* /temp2/* >> $LOGFILE
$LOGFILE is basically that - a log file. The result I currently get in the $LOGFILE is this:
‘/temp1/file1’ -> ‘/temp2/file1’
‘/temp1/file2’ -> ‘/temp2/file2’
‘/temp1/file3’ -> ‘/temp2/file3’
‘/temp1/file4’ -> ‘/temp2/file4’
First of all, I'd like to get rid of the prefix "‘" and trailing "‘". Secondly, I'd either like to show the current time (in hh:mm format) or elapsed time so $LOGFILE will show:
10:24 /temp1/file1 -> /temp2/file1
10:27 /temp1/file2 -> /temp2/file2
or
00:03 /temp1/file1 -> /temp2/file1
00:27 /temp1/file2 -> /temp2/file2
Could someone please help me fix one or both these issues?