Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Toby2007

    Awk: counting (large?) file rows and columns

    Doh! Thanks p5wizard & feherke. The code works much faster. Toby
  2. Toby2007

    Awk: counting (large?) file rows and columns

    Thanks feherke, I'm running awk that's supplied with Mac OS X 10.4.10. I think there was some hidden junk at the end of my file or something, because when i re-generated the input file, the awk script worked. I agree a dedicated counter would be better than my crummy slow code! wc works, but i...
  3. Toby2007

    Awk: counting (large?) file rows and columns

    Hi, I have written a one-liner script to count the # of rows and coulmns for a file, like this: % more dim if [ $# -eq 0 ] then echo "Usage: dim filename" exit fi awk 'BEGIN{FS="\t"} {nfe=NF} END{print NR " " nfe}' $1 This works fine on small files. e.g. % dim smallfile.ped 2300...
  4. Toby2007

    Awk: counting (large?) file rows and columns

    Hi, I'm a newbie to the forum & linux scripting in general, so i hope i'm posting the right place. Problem: I have written a one-liner script to count the # of rows and coulmns for a file, like this: % more dim if [ $# -eq 0 ] then echo "Usage: dim filename" exit fi awk...

Part and Inventory Search

Back
Top