10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
dear users and experts,
i am stuck withis command and i am unable to understand what is it doing??
ls -d * (7 Replies)
Discussion started by: seshank
7 Replies
2. Shell Programming and Scripting
Hi,
What is the difference in capitalizing the option 'i' of xargs command, (i.e) xargs -i and xargs -I?
Also, what is the difference between the below 2 commands?
output_from_cmd | xargs -I {} grep '{}' file
output_from_cmd | xargs -I grep '{}' file
Any efficiency or performance... (4 Replies)
Discussion started by: royalibrahim
4 Replies
3. Shell Programming and Scripting
Hi
I need to grep a particular world like and redirect into a temporary file .But while iam grepping some unwanted data are aslo coming like .ex In a FILE all these TABLENAMES are present .
module_table1,module_table2, module_table3,module_table5, module_table1_temp , module_table2_temp... (9 Replies)
Discussion started by: mani_isha
9 Replies
4. Shell Programming and Scripting
Hello,
I want to search for a file/directory named "abc" which is located anywhere in the given unix system.
I am using the command :-
But the problem is that this is giving me all combinations of files with have 'abc' in their name. But can I know the option to be used to get the location... (5 Replies)
Discussion started by: nsharath
5 Replies
5. Shell Programming and Scripting
shudnt this command :
grep test
give all the lines which do not hv 'C'. ^ wrks as negating character inside square brackets right ???
bt in my case grep is printin all the line in the file
also wht does
grep c+ test & grep c? test
shud do ??? (4 Replies)
Discussion started by: evergreen_cool
4 Replies
6. Shell Programming and Scripting
Hello
i am new shell scripting.
I have a file like this,
$ cat myfile
;/abc/abc.cpp@@/main/1;xyz
;/abc/abc.cpp@@/main/2;usr2
;/abc/abc.cpp@@/main/1;abc
;/abc/abc.cpp@@/main/2;usr2
;/abc/abc.cpp@@/main/1;usr1
when i grep the file.
$ grep "abc" myfile... (8 Replies)
Discussion started by: tsaravanan
8 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I am trying to understand a script and found a line as follows:
tr '\211\233\240' '\040' < $IN_FILE | tr -cd '\11\12\15\40-\176' > $TEMP_FILE
Can any one explain the above line .. What are they trying to translate using the tr command.. I have not used tr command.. so feeling little bit... (2 Replies)
Discussion started by: risshanth
2 Replies
8. UNIX for Advanced & Expert Users
PLEASE EXPLANIN ME...
sed 's~\(.*\)\(<name>\)\(.*\)\(</name>\)\(.*\)~\2\3\4~'
this is the format
<start><name>123<\name><addr>BAC<\addr><loc>sfo<\loc></start> (1 Reply)
Discussion started by: gksenthilkumar
1 Replies
9. AIX
I am new to unix...
How to get all the saturdays of a specific year?
for a specific month, i tried as below..
cal 02 2006 | awk '{print $7}'
but it is not giving all saturdays....
can anyone help me with this?
Thanks in advance,
Sumi (9 Replies)
Discussion started by: sumi
9 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I have one txt file as bellow:
Inspector logging xxxxx xxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxx Inspector logging xxxxxxxxxxxxxx
xxxxxxxxx xxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxx Inspector loggingxxxxxxxxxxxxxxx
Inspector logging xxxxx xxxxxxxxxxxxxxxxxxxxxxxx
I want... (1 Reply)
Discussion started by: redlotus72
1 Replies
GREP(1) General Commands Manual GREP(1)
NAME
grep - search a file for lines containing a given pattern
SYNOPSIS
grep [-elnsv] pattern [file] ...
OPTIONS
-e -e pattern is the same as pattern
-c Print a count of lines matched
-i Ignore case
-l Print file names, no lines
-n Print line numbers
-s Status only, no printed output
-v Select lines that do not match
EXAMPLES
grep mouse file # Find lines in file containing mouse
grep [0-9] file # Print lines containing a digit
DESCRIPTION
Grep searches one or more files (by default, stdin) and selects out all the lines that match the pattern. All the regular expressions
accepted by ed and mined are allowed. In addition, + can be used instead of * to mean 1 or more occurrences, ? can be used to mean 0 or 1
occurrences, and | can be used between two regular expressions to mean either one of them. Parentheses can be used for grouping. If a
match is found, exit status 0 is returned. If no match is found, exit status 1 is returned. If an error is detected, exit status 2 is
returned.
SEE ALSO
cgrep(1), fgrep(1), sed(1), awk(9).
GREP(1)