10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I have a question, during my readings it appears that these two variables in the snippet below need to be on the same line to return a “true” answer and listed in the output otherwise it won’t be returned. How can I write this snippet to make it return a “true” if those two variables are on... (6 Replies)
Discussion started by: bdby
6 Replies
2. Shell Programming and Scripting
Hi all,
I have a quick question:
I have a 4 column tab-separated file.
I want to count the number of times each unique value in column 2 appears and add that number in a 5th column.
I have the following input file:
waterline-n below-sheath-v 14.8097 A
dock-n below-sheath-v ... (4 Replies)
Discussion started by: owwow14
4 Replies
3. Shell Programming and Scripting
test.txt:
appleboy
orangeletter
sweetdeal
catracer
conducivelot
I want to only grep out lines that contain "appleboy" AND "sweetdeal". however, the closest thing to this that i can think of is this:
cat test.txt | egrep "appleboy|sweetdeal"
problem is this only searches for all... (9 Replies)
Discussion started by: SkySmart
9 Replies
4. UNIX for Dummies Questions & Answers
Counting number of lines: sp
I am trying to figure out a script to count the number of text files in cywig and have it give me a number (as the answer) any help would be appreciated.
I am new here, so be gentle :D (3 Replies)
Discussion started by: unicksjp
3 Replies
5. Shell Programming and Scripting
Hi all,
I use bash shell and I have a problem with wc.
I would like to determine the number of lines in a file so I do
wc -l filename
but I don't want to get the filename again
I just would like to have the number of lines and use it in a variable.
Can anybody help?
Thank you, (7 Replies)
Discussion started by: f_o_555
7 Replies
6. Shell Programming and Scripting
Hi all,
Can egrep using AND OR ?, like egrep -i "title.$1" AND "category.$2" ./home....
I want to give two search criteria, the files where egrep is seaching in for example
looks like below rows.
title this is an test
category space
(command line input)
$1 script.sh this space
... (6 Replies)
Discussion started by: tvrman
6 Replies
7. Shell Programming and Scripting
hi,
im just starting with scripting , i have de following situation
im doing a search in a data folder with egrep
egrep -i "title.regu." `find . -name "*.dat"`
the result is :
./20080816212245/index.dat:title Regular Expressions
./20080811212216/index.dat:title ... (5 Replies)
Discussion started by: tvrman
5 Replies
8. Shell Programming and Scripting
hi ,
I'm new at unix bash scripting, im playing a little bit with egrep/grep.
I have serveral files and i do a search on those files, like "aki", the result
is many rows outcoming and serveral of them are dubble because aki wil come more than ones in a file, how can i get a result that it... (3 Replies)
Discussion started by: tvrman
3 Replies
9. Shell Programming and Scripting
Well I have a 3000 lines result log file that contains all the machine data when it does the testing... It has 3 different section that i am intrsted in
1) starting with "20071126 11:11:11 Machine Header 1"
1000 lines...
"End machine header 1"
2) starting with "20071126 12:12:12 Machine... (5 Replies)
Discussion started by: vikas.iet
5 Replies
10. UNIX for Dummies Questions & Answers
Hi experts,
First of all thanks for all your help.
How can i count the lines within a text file and send this number to another text file?
And by the way how can i count the number of files inside a tape ("/dev/rtp") that as one pattern (Ex. "/CTA/") and send this number to a text file?
I... (6 Replies)
Discussion started by: jorge.ferreira
6 Replies