Please post your urgent questions here for highest visibility. Posting a new thread to this forum requires Bits. We monitor this forum to help people with emergencies, but we do not guarantee response time or answers. This forum is "best effort" only. Members who reply to posts here receive a bonus of 1000 Bits per reply.
I'm trying to replace space with inderscore on Mac OS X 10.6.3
sed -i 's/ /_/g' somefile
sed: 1: "hsa_mirbase.fa": extra characters at the end of h commandThis works perfectly fine on Linux.
Edit files in-place, saving backups with the specified extension.
So, for example:
sed -i.bak 's/ /_/g' somefile
(I guess that the extension is optional on Linux, but may be provided (will check!))
(actually, without checking too much, according to the man page here, it is optional)
(actually #2, the OSX man page is rubbish! It suggests that it is optional, but complains when it's not given)
Edit files in-place, saving backups with the specified extension. If a zero-length extension is given,
no backup will be saved. It is not recommended to give a zero-length extension when in-place editing
files, as you risk corruption or partial content in situations where disk space is exhausted, etc.
Last edited by Scott; 06-07-2010 at 04:57 PM..
The Following User Says Thank You to Scott For This Useful Post: