Find the answer to your Linux question:
Results 1 to 2 of 2
Hey all, i am going throaw all file in dir and want to print the files that having more than 1 "%" in their content... what should i exchange in ...
  1. #1
    Just Joined!
    Join Date
    Jul 2011
    Posts
    2

    printing file name , when using awk

    Hey all,
    i am going throaw all file in dir and want to print the files that having more than 1 "%" in their content...
    what should i exchange in BOLD?

    for file in * ;
    do awk -F'(%)' '{ t += (NF - 1) } END
    {if (t>1) print $file ;}'
    $file;done

    thanks!

  2. #2
    Just Joined!
    Join Date
    Jul 2011
    Posts
    2
    print FILENAME

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...