SED command doesn't works fine on AIX
I've been developed a script shell on Linux 7.2 enviroment.
This script uses SED to "parse" a string returned by db2 call command.
DB2_STATUS=`db2 "call dbo.sp_test(?,?,?)"`
RESULT_STATUS=`echo $DB2_STATUS | sed -f myregexp.rxp`
myregexp.rxp file contents:
In Linux, or Windows CygWin, this shell runs fine.
When I put this shell on AIX enviroment, I received a strange message:
"cannot parse.tion" or anything like that.
Someone could please help me to put this shell works properly?
If you can post the value of the DB2_STATUS variable, I (or someone else) can test it for you and see why it isn't working.
give some example output and what you want to achieve by running it with the sed command
Is this the GNU version of sed by any chance? Many commercial UNIXes ship with broken tools, and almost all commerctial UNIX sysadmins replace them with their GNU equivalents. ;)
In your regexp file you need to protect all "strange" characters like ^ by an backslash ! You need to put it before the "not allowed" characters, in bash you may put them after !
|All times are GMT -5. The time now is 10:18 PM.|