[SWLUG] timestamp in bash script

Dafydd Walters dafydd at walters.net
Thu Dec 19 18:52:32 UTC 2002


>
>  MYVAR=`stat -c "%y" ${FNAME} | sed -e "s/\(.*\)\
> \(.*\):\(.*\):\(.*\)\..*/\1_\2.\3.\4/"`
>

The script snippet I sent in the last email was split by my email client on
a space, i.e. it should have all be on one line, and there should be a space
between the backslash at the end of  the first line, and the backslash at
the start of the second.  The portion after the pipe symbol should read:

sed -e "s/\(.*\)\ \(.*\):\(.*\):\(.*\)\..*/\1_\2.\3.\4/"`






More information about the Swlug mailing list