Search Results

Search: Posts Made By: tina_2010
Forum: Fedora 11-10-2010
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
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

 
All times are GMT -4. The time now is 09:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy