parsed.org

Tips by tag: delimiter

Multiple Delimiters by http://xinu.myopenid.com/ on Jan 12, 2005 12:32 PM

If you need to fetch a substring, but you have more than one delimiter, throw them all in there on the -F option to awk.

Given the text <VirtualHost 192.168.1.0:80>:

$ awk -F" |>" '/^<Virtual/ {print $2}'

Would return 192.168.1.0:80.

awkdelimitershell
RSS