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

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:

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

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 ?

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.

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.

See vino's post below. Also do not bump up posts as this is against the forum rules.

What is the problem with this command ?
Show us your input data, the result from sed command and the expected result.

Try:
sed 's/build=[[:alnum:]_][[:alnum:]_]*/build=new_build/' test

Jean-Pierre.