I'm hoping someone can help me. I'm trying to awk a file to find a specific word and then pull the next word from the file.
There was an example in February 27, 2003 with the following
example:
awk '{if (match($0,/abcde:/)) print substr($0,RSTART+RLENGTH+1)}' filename
It was entered by someone named CaKiwi.
This is close to what I want but cannot get this to work or see what is wrong.
My version is:
tt50=`awk '{(match($0,/FROM /)) print substr$0,RSTART+RLENGTH+1)}' fix040705.sql`
echo ${tt50}
awk: syntax error near line 1
awk: illegal statement near line 1
Any help appreciated. It's probably a simple thing that
I'm missing.
thanks..
There was an example in February 27, 2003 with the following
example:
awk '{if (match($0,/abcde:/)) print substr($0,RSTART+RLENGTH+1)}' filename
It was entered by someone named CaKiwi.
This is close to what I want but cannot get this to work or see what is wrong.
My version is:
tt50=`awk '{(match($0,/FROM /)) print substr$0,RSTART+RLENGTH+1)}' fix040705.sql`
echo ${tt50}
awk: syntax error near line 1
awk: illegal statement near line 1
Any help appreciated. It's probably a simple thing that
I'm missing.
thanks..