Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google site



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

Closed Thread
English Japanese Spanish French German Portuguese Italian Powered by Powered by Google
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-03-2007
Registered User
 

Join Date: Sep 2007
Posts: 22
sed -r problem in AIX

Hi All,

I have one doubt in the AIX. I executed the below command in the LINUX but i could not execute same thing in the AIX. Please see the details of my issue in below.

[root@vcswin3 ~]# cat test
line 1 (one)
line 2 (two)
build=test
line 3 (three)

[root@vcswin3 ~]# sed -r 's/build=\w+/build=new_build/' test
line 1 (one)
line 2 (two)
build=new_build
line 3 (three)

I want execute the same above sed command in the AIX, but its throwing error like sed -r is illegal object. so please anybody tell me what is the related command in the AIX. so that i'll execute my issue in the AIX.

Thanks in Advance.... please help me ASAP.....


Regards,
Sridhar
Sponsored Links
  #2 (permalink)  
Old 09-03-2007
cfajohnson's Avatar
Shell programmer, author
 

Join Date: Mar 2007
Location: Toronto, Canada
Posts: 2,533
Quote:
Originally Posted by sridhusha View Post
I have one doubt in the AIX. I executed the below command in the LINUX but i could not execute same thing in the AIX. Please see the details of my issue in below.
...
[root@vcswin3 ~]# sed -r 's/build=\w+/build=new_build/' test
...
I want execute the same above sed command in the AIX, but its throwing error like sed -r is illegal object. so please anybody tell me what is the related command in the AIX. so that i'll execute my issue in the AIX.

The -r option is not standard. You should read your system's man page for sed to see whether it has any support for extended regexps.

Better still would be to use a basic regexp:

Code:

sed 's/build=.*/build=new_build/' test

  #3 (permalink)  
Old 09-04-2007
Registered User
 

Join Date: Sep 2007
Posts: 22
Normal sed also not working. Please give me any other way
  #4 (permalink)  
Old 09-04-2007
vino's Avatar
vino vino is offline Forum Staff  
Supporter (in vino veritas)
 

Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,814
Quote:
Originally Posted by sridhusha View Post
Normal sed also not working. Please give me any other way
Could you care to explain what is not working ? What did you try and what output did you get ?
  #5 (permalink)  
Old 09-11-2007
Registered User
 

Join Date: Sep 2007
Posts: 22
sed -r problem in AIX

I tried with following command also, still its not working in AIX Box.

sed 's/build=.*/build=new_build/' test

Please help me some body ASAP on this command.

Thanks,
Sridhar.
  #6 (permalink)  
Old 09-30-2007
Registered User
 

Join Date: Sep 2007
Posts: 22
sed -r problem in AIX

Come on guys ! no body is there to solve this ISSUE?
Please help me ASAP. I need this one very urjunt...........



Thnks in Advance.....

Regards,
Sridhar.
  #7 (permalink)  
Old 09-30-2007
reborg's Avatar
reborg reborg is offline Forum Staff  
Administrator
 

Join Date: Mar 2005
Location: Ireland
Posts: 4,330
See vino's post below. Also do not bump up posts as this is against the forum rules.
Sponsored Links
Closed Thread

Bookmarks

Tags
linux

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
problem with dd command or maybe AFS problem Anta Shell Programming and Scripting 0 08-25-2006 11:10 AM
SSH Problem auth problem budrito UNIX for Advanced & Expert Users 1 03-17-2004 10:12 AM



All times are GMT -4. The time now is 02:26 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2010. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0