08-17-2008
It sounds like you already know which commands you need to use. Where are you stuck? Have you read the man pages for those commands?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
hi,
cud u help me to find this.
i hav 2 files.
file1 has data as "ARUN
ARUN is from Australia
Arun likes America etc..
ARUN ARUN "
file2 has "ARUN
Australia
America"
i... (5 Replies)
Discussion started by: arunsubbhian
5 Replies
2. UNIX for Advanced & Expert Users
Hi
I'm looking for a .ksh script/function that will calculate ONLY the number of days between two distinct dates. Further convert the number of days to weeks and display. I need this to be part of another larger script that checks the password expiry on several servers and notifies the... (1 Reply)
Discussion started by: radheymohan
1 Replies
3. Shell Programming and Scripting
please
help me for this
"divide the file into multiple files containing no more than 50 lines each and find the number of words of length less than 5 characters" (3 Replies)
Discussion started by: annapurna konga
3 Replies
4. Shell Programming and Scripting
What should be the Shell script that counts a number of unique word contained in a file and print them in alphabetical order line by line? (7 Replies)
Discussion started by: proactiveaditya
7 Replies
5. UNIX for Dummies Questions & Answers
If i have a file sample.txt with more than 10 columns and 11th column as following data. would it be possible to get the distinct counts of values in single shot,Thank you.
Y
Y
N
N
N
P
P
o
Expected Result:
Value count
Y 2
N 3
P 2 (2 Replies)
Discussion started by: Ariean
2 Replies
6. Shell Programming and Scripting
I need a Shell script which take two inputs which are
1) main directory where it has to search and
2) pattern to search within main directory all files (.c and .h files)
It has to print number of pattern found in main directory & each sub directory.
main dir --> Total pattern found = 5
|... (3 Replies)
Discussion started by: vivignesh
3 Replies
7. UNIX for Dummies Questions & Answers
Hi !
input:
A|B|C|D
A|F|C|E
A|B|I|C
A|T|I|B
As the title of the thread says, I would need to get:
1|3|2|4
I tried different variants of this command, but I don't manage to obtain what I need:
gawk 'BEGIN{FS=OFS="|"}{for(i=1; i<=NF; i++) a++} END {for (b in a) print b}' input
... (2 Replies)
Discussion started by: beca123456
2 Replies
8. Shell Programming and Scripting
I want to sort a file with a list of words, in order of most occuring words to least occurring words as well as alphabetically.
ex:
file1:
cat 3
cat 7
cat 1
dog 3
dog 5
dog 9
dog 1
ape 4
ape 2
I want the outcome to be:
file1.sorted:
dog 1 (12 Replies)
Discussion started by: castrojc
12 Replies
9. Shell Programming and Scripting
Hi ,
I need to count the number of errors associated with the two words occurring in the file. It's about counting the occurrences of the word "error" for where is the word "index.js". As such the command should look like. Please kindly help. I was trying: grep "error" log.txt | wc -l (1 Reply)
Discussion started by: jmarx
1 Replies
10. Shell Programming and Scripting
The awk below is supposed to count all the matching $5 strings and count how many $7 values is less than 20. I don't think I need the portion in bold as I do not need any decimal point or format, but can not seem to get the correct counts. Thank you :).
file
chr5 77316500 77316628 ... (6 Replies)
Discussion started by: cmccabe
6 Replies
MAN(1) General Commands Manual MAN(1)
NAME
man - print out the manual
SYNOPSIS
man [ - ] [ -a ] [ -M path ] [ section ] title ...
DESCRIPTION
Man is the program which provides on-line access to the UNIX manual. If a section specifier is given, man looks in that section of the
manual for the given title(s). Section is either an Arabic section number (``3'' for example), or one of the words ``local'', ``new,'' or
``old''. (The abbreviations ``l'', ``n'', and ``o'' are also allowed.) If section is omitted, man searches all sections of the manual,
giving preference to commands over library subroutines, and displays the first manual page it finds, if any. If the -a option is supplied,
man displays all applicable manual pages.
Normally man checks in standard locations (/usr/man and /usr/local/man) for manual information. This can be changed by supplying a search
path (a la the Bourne shell) with the -M flag. The search path is a colon (``:'') separated list of directories in which man expects to
find the standard manual subdirectories. This search path can also be set with the environmental variable MANPATH.
Since some manual pages are intended for use only on certain machines, man only searches those directories applicable to the current
machine. Man's determination of the current machine type can be overridden by setting the environmental variable MACHINE.
If the standard output is a teletype, and the - flag is not provided, man uses more(1), or the pager provided by the environmental variable
PAGER, to display the manual page.
The FORTRAN version of section 3 of the manual may be specified by supplying man with the section ``3f''. Also, a specific section of the
local manual may be specified by appending a number to the section, i.e. ``l5'' would indicate section 5 of the local manual.
FILES
/usr/man standard manual area
/usr/man/cat?/* directories containing standard manual pages
/usr/local/man/cat?/* directories containing local manual pages
/usr/src/man directories containing unformatted manual pages
SEE ALSO
apropos(1), more(1), whatis(1), whereis(1)
BUGS
The manual is supposed to be reproducible either on the phototypesetter or on a typewriter, however, on a typewriter, some information is
necessarily lost.
4th Berkeley Distribution April 19, 1988 MAN(1)