Hi,
I have a small awk code which works in ksh, but doesn't work bash:
ksh:
$ echo $PATH|awk {' print index("abca","b" '}
2
bash:
bash-2.03$ echo $PATH|awk {' print index("abca","b" '}
awk: syntax error near line 1
awk: bailing out near line 1
In both shell I've used the same awk version.
I've tested it with other awk functions. When there is a "," in the awk command it fails always in bash. When I use a function with one parameter it works. (e.g exp,int).
Does somebody know which syntax should I use to be able to use functions with more parameters in bash?
thanks & rgrds
lseboek
I have a small awk code which works in ksh, but doesn't work bash:
ksh:
$ echo $PATH|awk {' print index("abca","b" '}
2
bash:
bash-2.03$ echo $PATH|awk {' print index("abca","b" '}
awk: syntax error near line 1
awk: bailing out near line 1
In both shell I've used the same awk version.
I've tested it with other awk functions. When there is a "," in the awk command it fails always in bash. When I use a function with one parameter it works. (e.g exp,int).
Does somebody know which syntax should I use to be able to use functions with more parameters in bash?
thanks & rgrds
lseboek