skip to main
|
skip to sidebar
Open IT
Monday, May 12, 2008
Different Methods to calculate the number of lines in a file
cat file_name | wc –l
wc –l < file_name
awk '{x++}END{ print x}' file_name
awk 'END{print NR}' file_name
sed –n ‘$=’ file_name
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Blog Archive
►
2012
(35)
►
December
(1)
►
November
(3)
►
October
(5)
►
September
(12)
►
August
(10)
►
July
(1)
►
May
(2)
►
January
(1)
►
2010
(16)
►
March
(1)
►
February
(14)
►
January
(1)
►
2009
(11)
►
November
(3)
►
October
(5)
►
May
(1)
►
March
(1)
►
February
(1)
▼
2008
(71)
►
November
(6)
►
October
(1)
►
August
(4)
►
July
(4)
►
June
(9)
▼
May
(16)
How to know, which all DBD exists on a Unix/Linux ...
UNIX shell differences and how to change your shell
BASH Frequently-Asked Questions
Csh Programming Considered Harmful
How to give each file a common extension using she...
Perl - How to open a gzipped file
Stored procedure and DBI/DBD module for perl
Hurd and Linux
MySQL DBI
How to search for a pattern in every file
awk or gawk user guide
Different Methods to calculate the number of lines...
Everything about - cookie -
Sun Solaris One liners
http://www.unixguide.net/unix/programming/
Unix Tricks
►
April
(6)
►
February
(12)
►
January
(13)
►
2007
(21)
►
December
(21)
Tech Dood
View my complete profile
No comments:
Post a Comment