I am trying to replace the whitespaces in the output of date with '_' with no success.
$date
Fri Sep 14 14:10:04 EDT 2012
$ date | sed 's/ /_/'
Fri_Sep 14 14:10:24 EDT 2012
As you can see, the last command only replaced the first whitespace by a _'. Why did it skip the other whitespaces?

datelet you specify the format directly instead so you DON'T have to massage it later with other tools. – jw013 Sep 14 '12 at 18:14