Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] For the sake of discussion, Arcane commands?



Eric,

While it is true that most applications do not use them you will find text
files extremely useful in many situations especially scripting..

Example 1 - scripting a ping sweep of your network dumping the pingable
machines and the results from nslookup ( use grep and cut to get the desired
name format ) and compare against a list of registered machines to find out
what has suddenly appeared on your network (find those people who hook up
their personal notebooks) or those machines that are not registered in DNS.

Example 2 - tail -f /path/to/some/logfile &  to monitor some logfile for
some application.

Example 3 - there's a list of 500 first name, last name, phone #, extra
stuff and you need a phone list report for your boss for his meeting in 10
minutes ( awk, cut, etc) in the format Last Name, First initial Phone #.
Sorted by last name.

Example 4 - you have to find only those uniq entries in a huge file and
count them up for the first field only.
                cat HUGEFILE.tab | awk '{print $1}' | sort | uniq | wc -l

Example 5 - you are working with some huge file over an *extremely* slow wan
link with a *terrible* delay.  (that's why I came to love vi - but that's a
whole 'nother kettle of fish)

Also, when someone doesn't have the specific application that you maybe
have, Tab seperated text files (and whatever import function their wacky app
may have) can save you a lot of time and trouble.

Of course all of this can be done in Perl as well :)

-c

----- Original Message -----
From: "Eric O. Flores" <tokoton@example.com>
To: <tlug@example.com>
Sent: Saturday, July 27, 2002 3:31 PM
Subject: [tlug] For the sake of discussion, Arcane commands?


> I've been puzzled with some of the commands for text streams and text
> processing and filtering; cut, expand, fmt, head, join, nl, od, pr,
> split, tac, tail, and wc.

Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links