05-08-2008
Hi Franklin,
Can you please eloborate on the third line of your script.
s{print s;s=0}1
I cant get the significance of 1 at the end.
Thanks in advance
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I want to write a sh shell script to read input report and search for a specefic pattern in file and print 3 record above and 2 record below the line in which pattern found.
My file contains different- different pattern repeatedly, same pattern set of records should go into one file... (9 Replies)
Discussion started by: singhald
9 Replies
2. Shell Programming and Scripting
Hi ALL :).
i have a file,
cat 3 +
dog 5 +
rat 6 -
i want to print no of record having pattern "+".
thanks in advance :confused:. (2 Replies)
Discussion started by: admax
2 Replies
3. Shell Programming and Scripting
My file goes like this:
SID_LIST_HOSTNAME_LISTENER_3 =
(SID_LIST =
(SID_DESC =
(SID_NAME = ORA0008)
(ORACLE_HOME = /opt/oracle/product/ORA0008)
(ENVS = "LD_LIBRARY_PATH=/opt/oracle/product/ORA0008/lib")
)
(SID_DESC =
(SID_NAME = ORA0007)
... (4 Replies)
Discussion started by: jpsingh
4 Replies
4. Shell Programming and Scripting
<Update>
I have the solution:
sed 's/\{3\}/&;&;---;4/'
The thread can be marked as solved!
</Update>
Hi There,
I'm working on a script processing some data from a website into cvs format. There is only one final problem left I can't find a solution.
I've processed my file... (0 Replies)
Discussion started by: lolworlds
0 Replies
5. Shell Programming and Scripting
Hi,
I have a file with more than 1000 lines with ~14 columns. I need to find all the lines with matching value in column 14 and then add column 6 in all the lines before printing them out..
e.g if this is the input file:
abc test input 10 for process 2345
abc test input 15 for process 2348... (1 Reply)
Discussion started by: xkdasari
1 Replies
6. Shell Programming and Scripting
Hi there,
Looking forward to your advice for the below:
I have a file which contains 2 paragraphs related to a particular pattern. I have to search for those paragraphs from a log file and then print a particular line from those paragraphs.
Sample:
I have one file with the fixed... (3 Replies)
Discussion started by: danish0909
3 Replies
7. Shell Programming and Scripting
Hi,
I'm very new to these forums. I was wondering if someone could help an AWK beginner with a pattern matching
an actor to his appearance in movies, which would be stored as records. Let's say we have a database of 4 movies (each movie a record with name, studio + year, and actor fields with... (2 Replies)
Discussion started by: Jill Ceke
2 Replies
8. Shell Programming and Scripting
Hi all,
I have table like this
A1
1 2
1 3
2 4
A2
3 1
1 2
1 1
A3
1 1
2 0
3 2
.....
An
And i want to add column to my table and the table will become like this : (3 Replies)
Discussion started by: psychop13
3 Replies
9. Shell Programming and Scripting
In the awk I am trying to add :p.=? to the end of each $9 that matches the pattern NM_. The below executes andis close but I can not seem to figure out why the :p.=? repeats in the split as in the green in the current output. I have added comments as well. Thank you :).
file
... (4 Replies)
Discussion started by: cmccabe
4 Replies
10. Shell Programming and Scripting
Original File
Server1|poweredOn|268401| Server1/Server1.vmx|Red Hat Enterprise Linux 5 (64-bit)
Need Output
Server1|poweredOn|DR|T1|268401| Server1/Server1.vmx|Red Hat Enterprise Linux 5 (64-bit)
Conduction to check find the string "SFCHT1" and "SR" and add prefix has... (4 Replies)
Discussion started by: ranjancom2000
4 Replies