11-24-2011
Thanks for the help guys, both of you gave me very useful tips, I found that CarloM's method worked wonders for me.
Now however I am having trouble finding values using GREP now, will I need to stop a new thread with the similar format as I did here, or can I just post my question here, still in the same format or even just regular perhaps?
8 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
can anyone explain me difference between tar and ufsdump commands.............and also i wd like to know the difference between incremental and differential backup.........
thx in advance (1 Reply)
Discussion started by: girish_shukla
1 Replies
2. UNIX for Dummies Questions & Answers
What is the difference between:
cd /tmp
tar -cf - *.txt |gzip > tmp_txt.tar.gz
and
cd /tmp
mknod pipe p
gzip < pipe > /tmp/tmp_txt1.tar.gz &
tar -cf pipe *.txt
Apart from the fact that we have to create the pipe file manually, is there any difference in the performance of the two?... (5 Replies)
Discussion started by: blowtorch
5 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I am trying to launch an ogg movie from a pdf file which has been produced with pdflatex and
\movie
{\centerline{\includegraphics
{grafiques_xerrades/un_manolo_amb_camera.pdf}}}
{hlims_xerrades/XocCumuls.ogg}
The switch "externalviewer" makes kpdf launch the default... (5 Replies)
Discussion started by: pau
5 Replies
4. UNIX for Dummies Questions & Answers
I have a directory with file types ending .log, .mml, .gll, .dll . How can I grep expressions only in say the .log files? (3 Replies)
Discussion started by: bbbngowc
3 Replies
5. Programming
If I want to declare an array of structures in C and have the number of items in that array to correspond to the items of an enumeration, is there a way to access the maximum value in the enumeration when declaring the array?
For instance:
typedef struct
{
various fields....
} ... (3 Replies)
Discussion started by: cleopard
3 Replies
6. What is on Your Mind?
On another simple topic, multiple choice answers OK ( you can pick more than one or suggest others - we will add your suggestions to the poll ).
What Types of Food Do You Like The Most? (27 Replies)
Discussion started by: Neo
27 Replies
7. Shell Programming and Scripting
the following excludes certain directories successfully
cp -r probe/!(dir) /destination
I want to exclude certain file types and tried unsuccessfully
cp -r probe/!(*.avi) /destination (2 Replies)
Discussion started by: tmf
2 Replies
8. UNIX for Advanced & Expert Users
Can I please have some ideas on how to do a recursive grep with certain types of files? The file types I want to use are *.c and *.java.
I know this normally works with all files.
grep -riI 'scanner' /home/bob/ 2>/dev/null
Just not sure how to get it to work *.c and *.java files. (5 Replies)
Discussion started by: cokedude
5 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)