Valued Contributor
Re: convert script to ksh93 (version 93)

hello,

 

thx to your answers.

 

@ Steven

 

   

sed -e 's/`\([^`]*\)`/$(\1)/g'

 

this handle 90 % of my script(s).

 

That won't help if the two "`" characters are on different lines, as in:

     if [ `echo "var6" |grep "var6"  > /dev/null 2> /dev/null; \
            echo $?` -eq 0 ]

 

with the other "sed" options i can handle it ?  like :

 

sed -e 's/`\([^`]*\)`/$(\1)/g' -e 's|\([?]\)`|\1)|g'  -e 's| `\([a-z]\)| $(\1|g' -e 's|=`|=$(|g' -e 's|`$|)|g'

 

@ Dennis

 

in some scripts are statements  ( here it is a example of a "case" statement  ) like

var7=` echo "a b c" | \
       awk ' { print $1 } '`  ;;

 

 

so i want to "devaluate" the of sed

sed -e 's|\([?']\)`|\1)|g' demo_ksh88.sh

 

like :


sed -e 's|\([?\']\)`|\1)|g' demo_ksh88.sh

 

>

 

but i can't  devaluate in a class

 

regards