The UNIX and Linux Forums
Forum Home
Linux and Unix Man Pages
Search Forums
Search Community Posts
Today's Posts
Quick Links
Man Pages
RedHat Commands
OpenSolaris Commands
Linux Commands
SunOS Commands
FreeBSD Commands
All UNIX Man Pages
All Linux Man Pages
Full Man Repository
Login or Register to Ask a Question and Join Our Community
Search Forums
Show Threads .
Show Posts
Tag Search
Advanced Search
Quick Links
Contact Us
Forum Rules
Today's Posts
FAQ
Pictures & Albums
All Albums
Miscellaneous
What is My IP
Whois
Mark Forums Read
Search Results
Showing results 1 to 2 of 2
Search took
0.01
seconds.
Search:
Posts Made By:
tina_2010
Forum:
Fedora
11-10-2010
2
Help with Unix commands
1,841
Posted By
rdcwayx
ratio of mobile to land line awk -F :...
ratio of mobile to land line
awk -F : '{a[substr($NF,1,2)]++}END {print " ratio of mobile to land line is ", a["07"]/a["01"]}' infile
ratio of mobile to land line is 2
the most popular...
Forum:
Fedora
11-10-2010
2
Help with Unix commands
1,841
Posted By
jim mcnamara
Ratio: awk -F':' ' $NF ~/^01/ { land++;...
Ratio:
awk -F':' ' $NF ~/^01/ { land++; next} $NF~/^07/ { mobile++} 0
END{ printf(" land to mobile = %.2f \n", land/(land + mobile) ) }' inputfile
This sound like homework to...
Showing results 1 to 2 of 2
Member Badges and Information Modal
×