Sponsored Content
Full Discussion: Help with Unix commands
Operating Systems Linux Fedora Help with Unix commands Post 302470703 by rdcwayx on Wednesday 10th of November 2010 10:08:10 PM
Old 11-10-2010
ratio of mobile to land line

Code:
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 first name and list the telephone numbers

Code:
 awk -F : 'NR==FNR{a[$1]++; m=(a[$1]>m)?a[$1]:m;next}{if (a[$1]==m) print $1,$NF |"sort"}' infile infile

Jenny 07337349573
Jenny 07337349573
Jim 07404751140
Jim 07404751140
Richard 01264290192
Richard 01264290192

This User Gave Thanks to rdcwayx For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Unix Commands

Where can I get a list of basic commands ? I want to get up to speed as soon as possible ? thanks..... (4 Replies)
Discussion started by: drukkie
4 Replies

2. UNIX for Dummies Questions & Answers

Maingrame to UNIX sending UNIX commands

I want to know if there is a way to send unix commands thru FTP from a mainframe to kick off Autosys Jobs. I just need to send a command from the mainframe to UNIX and have UNIX execute that command. (2 Replies)
Discussion started by: skammer
2 Replies

3. UNIX for Dummies Questions & Answers

Unix Commands?

I would be happy to streamline some of the commands I am trying to learn with easy to remember terms, like dir for ls -l. I am wondering if you script certain commands for every time you start-up your system, can use those aliases there? If so, would that prove a problem for administrators who... (2 Replies)
Discussion started by: wmosley2
2 Replies

4. HP-UX

Unix Commands

HP 9000/800 Server running HP-UX UNIX Server, users are connected via LAN and dialup connection. Need help to write SHELL SCRIPT or UNIX Commands which would perform the following: -ping IP address of all login/connected users to our server -send customized text message to all the login... (1 Reply)
Discussion started by: Moinul Haque
1 Replies

5. UNIX Desktop Questions & Answers

Unix commands

What is the unix command that will display the current UTC time, hours, and minutes only. What is the unix command for sorting in descending order. What is the unix command for display the first 10 characters in a file. (4 Replies)
Discussion started by: charlton
4 Replies

6. UNIX for Dummies Questions & Answers

Running UNIX commands remotely in Windows box from Unix box – avoid entering password

I am able to run the UNIX commands in a Windows box from a UNIX box through "SSH" functionality. But whenever the SSH connection is established between UNIX and Windows, password for windows box is being asked. Is there a way to avoid asking password whenever the SSH connection is made? Can I... (1 Reply)
Discussion started by: D.kalpana
1 Replies

7. UNIX for Dummies Questions & Answers

unix commands...

i want to know how to do a few things using unix commands. firstly say I have a .txt file that contains random lines like Hello Goodbye I'm tired 5 74 using the grep command how can I get a list of lines that contain ONLY digits? also using pipes to combine ls and grep commands how... (5 Replies)
Discussion started by: ez45
5 Replies

8. UNIX for Dummies Questions & Answers

ALL unix commands

Hello Folks Where can I find all the unix commands with explanations , on the internet. I am searching but most of the sites are listing a few of the important ones. PLease guide through thanks (4 Replies)
Discussion started by: supercops
4 Replies

9. UNIX for Dummies Questions & Answers

$ commands in unix

What are the various commands which use $ in unix and what do each of these indicate? eg: echo $? returns the success status of the previous commands..similarly $$ returns some numeric value..wat exactly are these? From where can a download a document which can help me getting more details about... (2 Replies)
Discussion started by: DDS
2 Replies

10. UNIX for Dummies Questions & Answers

Unix Commands help

Having trouble doing the following things, I know it has something to do with using metacharacters but I'm not able to get it working correctly. I need a command to get a long directory listing of all the files that have: exactly two characters following the letters zot. all files that... (1 Reply)
Discussion started by: lakers34kb
1 Replies
gnokiid(8)							      gnokii								gnokiid(8)

NAME
gnokiid - create a virtual modem for old Nokia mobile phones SYNOPSIS
gnokiid gnokiid [--help|--version|--debug] DESCRIPTION
gnokiid is a tool from the gnokii tool suite used to create a virtual modem device with a Nokia portable telephone. The virtual modem device is usually accessed via a symbolic link called /dev/gnokii (created automatically by mgnokiidev(8)). Please note that you don't need a virtual modem when you have real modem accepting AT Hayes commands (most of the modern phones). gnokiid was written for the phones that supported data transfer but didn't expose AT layer (namely Nokia 6110, 6130, 6150, 5110, 5130). After gnokiid has created the virtual modem, it can be accessed like any other Hayes-compatible modem by such programs as the terminal pro- gram minicom(1) or the PPP daemon pppd(8) to make standard data connections to remote computers. The full range of portable telephone functions (SMS messaging, phone book, operator logos, etc.) are accessed using the command-line pro- gram gnokii(1) or the graphical interface program xgnokii(1x). gnokii is a Linux/Unix tool suite and (eventually) modem/fax driver for Nokia mobile phones, released under the GPL. gnokii supports most phones from the 3810/8110 and 5110/6110 series, details including bugs specific to each series appear in the files Docs/README-3810 and Docs/README-6110 respectively. OPTIONS
If called without any options, gnokiid will set up a virtual modem device using the settings in gnokii(1) config file (if it exists). Oth- erwise, --help print out a short usage message --version print out version, copyright, phone, and serial device info --debug uses STDIN/STDOUT for a virtual modem DIAGNOSTICS
Various error messages are printed to STDERR. BUGS
Hmmm... AUTHOR
Hugh Blemings <hugh at blemings dot org> and Pavel Janik ml. <Pavel.Janik at suse dot cz> are the authors of the gnokii tool suite. This manual page was written by Erik Rossen <rossen at freesurf dot ch>. See also Docs/CREDITS from the gnokii sources. COPYING
This program is distributed under the GNU Public License Version 2, or (at your option) any later version.. SEE ALSO
gnokii, xgnokii, mgnokiidev Erik Rossen May 27, 2001 gnokiid(8)
All times are GMT -4. The time now is 04:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy