Multiple Field separator in awk script

view full story

http://stackoverflow.com – i have following code that gives me output as number of lines and words in a file. how can i use one more FS(file separator) that can be used to count total characters.?? (the output should be same as wc file command ) BEGIN { FS="\n| "; } { for(i=1;i<=NF;i++) w++ l++ } END { print "Total no of Lines:"l; print "Total no of words:"w; } (HowTos)