awk command

view story

http://www.unix.com – Hi All, I use awk command for some specific cases and I am struck at a point. I have file which as a delimiter value as ^^ contents of the file as below: Code: col1^^col2^^ ^^col4^^col5^^^^^^ cola^^^^ ^^ ^^col5^^col6^^col7^^col8 I would like to be able to use a command by which I can find out how many columns are in each line. i was using Code: awk -F'/\^/\^' '{print NF}' <fileName> but its not working, how to make it understand that my delimiter is ^^ any help is appreciated, This could be simple to many, but for me I am struck and need help. Thanks (HowTos)