9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I have below script which is used to grep specific errors and if error string matches send an email alert.
Script is working fine , however , i wish to print next 10 lines of the string match to get the details of error in the email alert
Current code:-
#!/bin/bash
tail -Fn0 --retry... (2 Replies)
Discussion started by: neha0785
2 Replies
2. Shell Programming and Scripting
Hello Everyone,
I want to print out the records after and before a certain record. I am able to figure out how to print that particular record but not the ones before and after. Looking for some advice
Thank you (6 Replies)
Discussion started by: danish0909
6 Replies
3. Shell Programming and Scripting
Please help .
The script need to first grep for all lines with "C:" as it contains a value
Here the value is 0
1,00: This , is a good script c:0
and then give output of the lines with top 3 highest value for c:
1,00: This , is a nice script c:9999
1,00: This , is a... (3 Replies)
Discussion started by: necro98
3 Replies
4. Shell Programming and Scripting
Hi !
I need some help with a script I am writing.
I am trying to compare two files, the first file being in this format :
Header1
Text1-1
Text1-2
Text1-3
Header2
Text2-1
etc...
For each header, I want to check if it appears in the second file, and if it is the case print the header... (4 Replies)
Discussion started by: jbi
4 Replies
5. Shell Programming and Scripting
Hello Everyone,
I just started scripting this week. I have no background in programming or scripting.
I'm working on a script to grep for a variable in a log file
Heres what the log file looks like. The x's are all random clutter
xxxxxxxxxxxxxxxxxxxxx START: xxxxxxxxxxxx... (7 Replies)
Discussion started by: rxc23816
7 Replies
6. Shell Programming and Scripting
Hello all,
I need to print all the lines before a specific string and print a custom message 2 lines after that.
So far I have managed to print everything up the string, inclusively, but I can't figure out how to print the 2 lines after that and the custom message.
My code thus far is:... (4 Replies)
Discussion started by: SEinT
4 Replies
7. Shell Programming and Scripting
Hi,
The below code will search a particular string(say false in this case) and return me 10 lines above and below the search string in a file.
" awk 'c-->0;$0~s{if(b)for(c=b+1;c>1;c--)print r;print("***********************************");print;c=a;}b{r=$
0}' b=10 a=10 s="false" "
... (5 Replies)
Discussion started by: vimalm22
5 Replies
8. Shell Programming and Scripting
Hi,
A very Good Evening to All,
I am writing a script for my application. I have a file with 1000 lines. Among that 1000 lines i am searching for a particular string. And from that string i need to pull all the data in to a seperate file.
For example the contents of my file is as below.
... (4 Replies)
Discussion started by: intiraju
4 Replies
9. Shell Programming and Scripting
hi,
i m having 2 files say F1 and F2.
there are some joining conditions like:
Column 4 from F1= Column 29 from F2;
Column 10 from F1= Column 165 in F2;
and if value in column 8 from F2='3'
than i should get Column 4,5,8,10 from F1 and 29,165 from F2.
I cant provide the files. but the... (4 Replies)
Discussion started by: Mohit623
4 Replies