10-21-2008
You have the line as a variable so why more tricky actions to get the same result?
It's sufficient if the grep command is successful..or have I missed something?
Regards
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Ok, I'm stumped and can't seem to find relevant info.
(I'm not even sure, I might have asked something similar before.):
I'm trying to use shell scripting/UNIX commands to extract URLs from a fairly large web page, with a view to ultimately wrapping this in PHP with exec() and including the... (2 Replies)
Discussion started by: ropers
2 Replies
2. UNIX for Dummies Questions & Answers
Hi All,
I have 2 programs running by the following names:
a_testloop.sh
testloop.sh
I read these programs names from a file and store each of them into a variable called $program.
On the completion of the above programs i should send an email.
When i use grep with ps to see if any of... (3 Replies)
Discussion started by: albertashish
3 Replies
3. UNIX for Dummies Questions & Answers
This is the line that I am using:
sed 's/^*\({3}*$\)/\1 /' <test.txt >results.txt
and suppose that test.txt contains the following lines:
http://www.example.com/200904/AUS.txt
http://www.example.com/200903/_RUS.txt
http://www.example.com/200902/.FRA.txt
What I expected to see in results.txt... (6 Replies)
Discussion started by: figaro
6 Replies
4. UNIX for Dummies Questions & Answers
Dear Folks,
I am having a requirement to grep a word which could be a part of a substring of a file. Please help me with the command for korn shell.
Let me give you a example
I am having a file in which the data is based on positions.
Lets say
1-5 is Emp ID 6-10 is Emp Name 11-15 is Salary... (5 Replies)
Discussion started by: dinesh1985
5 Replies
5. Shell Programming and Scripting
Hi gurus,
I am trying to figure out how to extract substring from file line (all lines in file), as specified position and specified legth.
Example input (file lines)
dhaskjdsa dsadhkjsa dhsakjdsad hsadkjh
dsahjdksahdsad sahkjd sahdkjsahd sajkdh adhjsak
I want to extract substring on... (5 Replies)
Discussion started by: ProsteJa
5 Replies
6. Shell Programming and Scripting
Hi All
I have a line which is as below
1234567 Gagan Paswani zz23432 1000000000 1000000000 ASTHEYXX-RTUC zz23432
I need to extract the first occurence of zz23432 which will have the reg expression as
{2}{5}
Could you please assist as to how I can extract this... (3 Replies)
Discussion started by: Prashantckc
3 Replies
7. Shell Programming and Scripting
Hello Colleagues,
I have a file that looks like below.
6-12731913-12731913
9230760143480
410018547148230
20131002193434+0500
20131002193434+0500
;20131002T161031000-10.50.241.21-21912131-1419034760, ver: 0
20131009
92220056296730
CC0P
abc
Core_Context_R1A
SMS
6-12726796-12726796... (14 Replies)
Discussion started by: umarsatti
14 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I have a number of files containing the information below.
"""""
Fundallinfo
6.3950 14.9715 14.0482
"""""
I would like to grep for Fundallinfo and use it to read the next line? I ideally would like to read the three numbers that follow in the next line and... (2 Replies)
Discussion started by: Paul Moghadam
2 Replies
9. Shell Programming and Scripting
Hi guys,
I need to append new data at the end of each line of the files. This new data is based on substring (3rd fields) of last column.
Input file xxx.csv:
U1234|1-5X|orange|1-5X|Act|1-5X|0.1 /sac/orange 12345 0
U5678|1-7X|grape|1-7X|Act|1-7X|0.1 /sac/grape 5678 0... (5 Replies)
Discussion started by: null7
5 Replies
10. Shell Programming and Scripting
Hi,
I'm trying to make a grep to see if exists occurrences with a sentence like these:
grep -qi "message" file0 | grep -i $date | grep -vi "exception"
echo $?
1
If I execute without -q modifier I can find occurrences.
Someone could help me please?
Thanks and sorry for my English! (1 Reply)
Discussion started by: mierdatuti
1 Replies