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?