converting spaces into dashes
The standard tr
utility does exactly this:
tr ' ' '-' <filename.old >filename.new
sed --in-place 's/ /-/g' /path/to/file
with perl:
perl -ne 's/ /-/g;print ' FILE
The standard tr
utility does exactly this:
tr ' ' '-' <filename.old >filename.new
sed --in-place 's/ /-/g' /path/to/file
with perl:
perl -ne 's/ /-/g;print ' FILE