unexpected result from sh script with `date`
Tigger
tigger at lvlworld.com
Fri Feb 2 11:42:51 UTC 2007
Hello, the following simply sh script is outputting unexpected results.
Any idea why?
--script--
#!/bin/sh
started=`date`
echo "Started at: $started"
echo "Finished : "`date`
exit
--output--
Started at: Fri Feb 2 22:13:51 EST 2007
Finished : Fri Feb 2 22:13:51 EST 2007
--problem--
Between 'Feb' and '2', there is two spaces on the 'Started at' line,
however the 'Finished' one only has 1 space.
I know this sounds picky, but I was not expecting this at all.
uname -a
FreeBSD piglet 6.2-STABLE FreeBSD 6.2-STABLE #0: Fri Jan 19 04:13:20 EST
2007 tigger at piglet:/usr/obj/usr/src/sys/PIGLET i386
-Tig
More information about the freebsd-questions
mailing list