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.
Thank you
Joseph Dhahbi
SED on OS X is the BSD version (certainly is on OS X 10.6.4).
I have found that GNU versions of UNIX utilities often have far more options available to them, the danger is that if you know the extra options, you'll miss them on BSD based systems.
Hello,
I am on a Mac and trying to clean up some monthly files with a very simple SED:
sed '3,10d;/<ACROSS>/,$d' input.txt > output.txt
(from the input, delete lines 3 - 10; then delete from the line containing <ACROSS> to the end of the file)
then output to output.txt
Even when I try... (2 Replies)
Super basic question. I installed sed GNU on a MAC running High Sierra. However, when I run sed '1i>sometext, I get the following error:
sed: 1: "1isometext"; command i expects \ followed by text
I have added the \ with no success. Is there anyway I can run sed and awk on MAC in the... (5 Replies)
I am being asked to use RHEL red hat instead of ubuntu. Are the basic commands the same? I know the licensing is different, but are the package mangers/repositories the same?
That is will sudo apt-get still be used? I have been using ubuntu for 4 years and have never used red hat so any... (5 Replies)
Hi,
I've been trying to work out how to add a new line to a file when the pattern matches .dmg.
I've been searching Google but yet not found a working solution.
Help would be appreciated... (9 Replies)
Hi,
Unless I am missing some serious differences in Mac and linux in terms of C programming, I dont know why this would happen. Please take a look at the following piece of code fragment:
bool add_input_to_db(Cons *new_data) {
// Set the attributes of the lock
struct flock fl =... (3 Replies)
Hi Gurus!
I recently got my shell account (HP UX v11) created by our sysadmin and am having problem deleting with the backspace key.
After doing some reading, I believe I need to enter a custom "STTY..." statement in my profile.
Can someone please help me with the correct "STTY" sequence... (3 Replies)