Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to tell GNU sed or common sed(simple but I need it)

Status
Not open for further replies.

adaaje

Technical User
May 26, 2006
60
AU
Hi guys,

I tried to running some sed command in my linux something like [sed '/|$/!N;s/\n//'], but it doesn't work same as my unix sed.

I assume my linux has different sed format, I typed in my linux : "man sed"

and it said :
Code:
NAME
       sed - manual page for sed version 4.1.3
...

GNU sed also supports some special 2-address forms:
...

So, the question is how many sed format do we have and how to tell the difference ? and what sed command shoud I use to have the same result as in unix sed [sed '/|$/!N;s/\n//'] ?

Thx guys,
 
What Unix do you mean by "unix"? It seems to work okay on Solaris.

Annihilannic.
 
Yes, It works fine using "Unix solaris sed" but not with my "linux mandriva sed". So, I was just wondering what sed that I have in my linux, THX.
 
And as Richard Stallman said himself:
GNU is Not Unix.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top