AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only
  • 1.  AIX 5.2 - Sed Function Parsed Error - Why?

    Posted Tue February 28, 2006 10:12 AM

    Originally posted by: SystemAdmin


    Why do I get Sed errors? I checked the AIX's man page for Sed and it showed the syntax for both of these Sed command seem to be correct from the look of it. I noticed I still get this Sed error in AIX 4.3 as well. The example code I use are

    snip
    1. sed -e "install_sh=/usr/local/src/sed-4.1.5/config/install-sh" > testcase1.txt
    sed: 0602-404 Function install_sh=/usr/local/src/sed-4.1.5/config/install-sh cannot be parsed.

    1. sed -e "a\
    >install_sh=/usr/local/src/sed-4.1.5/config/install-sh" > testcase1.txt
    sed: 0602-404 Function ainstall_sh=/usr/local/src/sed-4.1.5/config/install-sh cannot be parsed.
    snip

    I also do not know why do I get this Sed error as I'm not familiar with this syntax? This script is found in one of the Apache's shell script that was use for generating and copying over of the PHP's DSO module into Apache's directory as this is what the script was trying to do. This was done on AIX 5.2 and I have not tested it with AIX 4.3.

    snip
    1. sed -n "/^dlname=/{s/.*='\(*\)'/\1/;p}" /usr/local/apache2/modules/libphp5.la
    sed: 0602-404 Function /^dlname=/{s/.*='\(*\)'/\1/;p} cannot be parsed.
    snip

    Thanks...


  • 2.  Re: AIX 5.2 - Sed Function Parsed Error - Why?

    Posted Wed March 08, 2006 12:24 PM

    Originally posted by: SimonMarchese


    > # sed -e
    > "install_sh=/usr/local/src/sed-4.1.5/config/install-sh
    > " > testcase1.txt
    > sed: 0602-404 Function
    > install_sh=/usr/local/src/sed-4.1.5/config/install-sh
    > cannot be parsed.

    I think you're missing something from the original here - in this example you're asking sed to run the editing command "install_sh=/usr/local/src/sed-4.1.5/config/install-sh" and it doesn't understand it. Even if it could understand it you are not supplying any stdin for it to process.