Difference between revisions of "Linux command: awk"
Jump to navigation
Jump to search
Rafahsolis (talk | contribs) m (Protected "Linux command: awk" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))) |
Rafahsolis (talk | contribs) |
||
| Line 3: | Line 3: | ||
<source lang="bash"> | <source lang="bash"> | ||
awk -F, '{print NR, length($0)}' filename.txt #print line number and line length | awk -F, '{print NR, length($0)}' filename.txt #print line number and line length | ||
| + | awk '{print FILENAME " " length($0)}' */PRF* | uniq | ||
</source> | </source> | ||
Revision as of 15:40, 12 November 2015
Comand line text processing Examples:
awk -F, '{print NR, length($0)}' filename.txt #print line number and line length
awk '{print FILENAME " " length($0)}' */PRF* | uniq