10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi
I wanted to know if there is an option in grep command to show the number of results (not the number of lines of findings).
Thanks (14 Replies)
Discussion started by: abdossamad2003
14 Replies
2. Shell Programming and Scripting
Hi All,
This is my Scenario:
I wanted to check if a particular name or pattern is present in a file based of that rest of the program should proceed.
I want to print '0' if no matching found.
v_File_Count=`grep -i "$v_Name_Pattern" $File_Path/Master_File_List.txt | wc -l` The above command... (5 Replies)
Discussion started by: TechGyaann
5 Replies
3. Shell Programming and Scripting
Hi,
I would like to show the difference between two numbers. For example.
input.txt
1 7
2 10
0 0
6 7
I would like a third field showing the difference between the numbers as below:
ouput.txt
1 7 6
2 10 8
0 0 0
6 7 1
How do I do this? (4 Replies)
Discussion started by: general_lee
4 Replies
4. Shell Programming and Scripting
Hi guys,
This is probably very easy but I've no idea how to pull this out.
Basically, I need to find errors into a very large logfile. When you grep the ID, the output is like this:
+- Type: 799911 Code: Ret: 22728954 Mand: X Def: Des: UserDes: SeqNo: 2
+- Type: 799911 Code: Ret:... (5 Replies)
Discussion started by: Arkadia
5 Replies
5. Shell Programming and Scripting
How can I find the number of lines in a file excluding lines
starting with #? (4 Replies)
Discussion started by: kristinu
4 Replies
6. Shell Programming and Scripting
I have a file like
blah
blah blah blah
this is the text I need,
which might be between 1-4 lines, but
always has a blank line above and below
it, and is at the end of the text file
the code tags don't show the trailing blank line. I started by deleting the last blank line with:
... (2 Replies)
Discussion started by: unclecameron
2 Replies
7. Shell Programming and Scripting
I have a file with a list of config files numbered on the lefthand side 1-300. I need to have bash read each lines number and assign it to a variable so it can be chosen by the user called by the script later.
Ex. 1 some data
2 something else
3 more stuff
which number do you... (1 Reply)
Discussion started by: glev2005
1 Replies
8. AIX
I'm investigating an issue where rsync's to an AIX server will sometimes fail. I suspect the problem might be due to the number of simultaneous SSH connections being made to the host dropping the rsync attempts. I'd like to view the number of open ssh connections. The who command will list logged... (1 Reply)
Discussion started by: indiana_tas
1 Replies
9. Shell Programming and Scripting
Hello all
Im trying to write one liner that will show me results only if the result of the expression is greater then 0
For example:
I do :
find . -name "*.dsp" | xargs grep -c SecurityHandler
the result are :
./foo/blah/a.dsp:0
./foo/blah1/b.dsp:1
./foo/blah2/c.dsp:2... (1 Reply)
Discussion started by: umen
1 Replies
10. UNIX for Dummies Questions & Answers
Hi all
How can I make Emacs to show the line numbers at the left or right as a default. This might help me to quickly jump to a given line.
Thanks
SS (9 Replies)
Discussion started by: saurya_s
9 Replies