how i can use a WORD for seperator

hi,

i want to use A WORD for seperator in awk or especially in cut. how i can perform this. is there any way to use a word for seperator.

For example: i want to list all word after FROM and the files name contains this word.

chatnorollback.svc: delete from info where nick
chatnorollback.svc: delete from webbilling where
chatnorollback.svc: delete from webbilling where
chatnorollback.svc: sql {delete from login where
chatnorollback.svc: sql {delete from odablack
chatnorollback.svc: sql {delete from blacklist
chatnorollback.svc: sql {delete from info where
chatnorollback.svc: sql {delete from register

thanks in advance,

Not really, but this might help.

sed -n 's/^\([^ ][^ ]*\).*from/\1/p' file.txt

Set the awk built-in variable FS (Field Separator) to the value you want...

awk -v FS=from '{print $2}' file.txt

The details are in the awk manual: Specifying how Fields are Separated

Ygor, of course you're correct. I had some strange notion in my head about only being able to use on char as the FS.