10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i want to search a log for a string. when that string is found, i want to grab the a set number of lines that came before the string, and a set number of lines that come after the string.
so if i search for the word "Error" in the /var/log/messages file, how can I output the 20 lines that came... (4 Replies)
Discussion started by: SkySmart
4 Replies
2. Shell Programming and Scripting
say i have a statement like this in a script
tail -f /opt/blah/blha/user.log > final.log
if ;then
cat final.log | grep -i "servicer_user" > service.log
cat final.log | grep -i "logic_user" > logic.log
fi
echo "script completed"
but when the script is running if i press ctrl + c the... (4 Replies)
Discussion started by: vivek d r
4 Replies
3. UNIX for Dummies Questions & Answers
Right now, my code is:
s/Secondary Ins./Secondary Ins.\
1/g
It's adding a 1 as soon as it finds Secondary Ins.
Primary Ins.: MEDICARE B DMERC Secondary Ins.
1: CONTINENTAL LIFE INS
What I really want to achieve is having a 1 added on the next line that contain "Secondary Ins." It... (4 Replies)
Discussion started by: newbeee
4 Replies
4. Shell Programming and Scripting
Hi,
I have two variables x and y.
i need to find a particular string in a file, a workflow name and then insert the values of x and y into the next lines of the workflow name.
basically it is like as below
wf_xxxxxx
$$a=
$$b=
$$c= figo
$$d=bentley
i need to grep the 'wf_xxxx' and then... (6 Replies)
Discussion started by: angel12345
6 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. Linux
Hi all,
I have a question..
Here is my requirement..I have 500 files in a path say /a/b/c
I have some numbers in a file which are comma seperated...and I wanted to check if the numbers are present in the FileName in the path /a/b/c..if the number is there in the file that is fine..but if... (1 Reply)
Discussion started by: us_pokiri
1 Replies
7. UNIX for Dummies Questions & Answers
Hi guys i am tailing a constantly appending log file. However, I am looking for some specific word to be seen only when there is an update.
How should I look for the word "{test-0101}" in tail, so that it only shows when there is a line that contains {test-0101} ?
Thanks (1 Reply)
Discussion started by: DallasT
1 Replies
8. Solaris
CPAN.pm: Going to build G/GA/GAAS/Unicode-String-2.09.tar.gz
Checking if your kit is complete...
Looks good
Writing Makefile for Unicode::String
cp String.pm blib/lib/Unicode/String.pm
cp lib/Unicode/CharName.pm blib/lib/Unicode/CharName.pm
/usr/bin/perl /usr/perl5/5.8.4/lib/ExtUtils/xsubpp... (5 Replies)
Discussion started by: PatrickBaer
5 Replies
9. Shell Programming and Scripting
Okay, I have two scripts, the first one does some stuff, and comes to a point where it has this:
Right here it runs a quick script to start something that writes to a log file.
/usr/bin/tail -f ${pathVar}/nohup_${servVar}.out |
while read -r line
do
] && continue
cd ${pathVar}... (0 Replies)
Discussion started by: cbo0485
0 Replies
10. Shell Programming and Scripting
Hello,
I try to write a shell script that would list all files on a directory and stop when it finds the first item specified on a find or ls command.
How can I tell to the find or ls command to stop when it finds the first ".doc" file for example ?
Thank you (7 Replies)
Discussion started by: davchris
7 Replies