10 More Discussions You Might Find Interesting
1. 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
2. UNIX for Dummies Questions & Answers
Hi
I have a file:
r58778.3|SOURCES={KEY=f665931a...,fw,221-705}|ERRORS={16_1:T,30_1:T,56_1:C,57_1:T,59_1:A,101_1:A,115:-,158_1:C,186_1:A,204:-,271_1:T,305:-,350_1:C,368_1:G,442_1:C,472_1:G,477_1:A}|SOURCE_1="Contig_1092402550638"(f665931a359e36cea0976db191ff60ff09cc816e)
I want to retain... (15 Replies)
Discussion started by: Alyaa
15 Replies
3. Shell Programming and Scripting
Hi,
I have got the below requirement. please suggest.
I have a file like,
Processing Item is:
/data/ing/cfg2/abc.txt
/data/ing/cfg3/bgc.txt
Processing Item is:
/data/cmd/for2/ght.txt
/data/kernal/config.klgt.txt
I want to process the above file to get the output file like,
... (5 Replies)
Discussion started by: rbalaj16
5 Replies
4. UNIX for Dummies Questions & Answers
Hi Folks,
I am searching for a pattern in logs through putty by opening the file in vi editor
and reaching to the last of the file by $ and then searching the pattern , lets say I have to search the pattern abc then it would be ?abc Now I want line numbers along with the matching pattern to be... (3 Replies)
Discussion started by: SankalpS
3 Replies
5. Shell Programming and Scripting
awk 'BEGIN{IGNORECASE=1} /error|warning|exception/ { ++x } END { print x }' filename
The above command returning the number of times the pattern present in the file. But I want the the line number as well. please help me out (6 Replies)
Discussion started by: arukuku
6 Replies
6. Shell Programming and Scripting
Hi,
I have a file:
5 T1AxialPremosaic ok 512 448 23 1 284000-000005-000001.dcm
6 T2_SPACE ok 256 256 176 1 465000-000006-000001.dcm
7 FLAIRmosaic ok 512 432 23 1 748000-000007-000001.dcm
8 T2_SPACE ok 256 256 1 171000-000008-000001.dcm
9 T2_SPACE ok 256 256 1 218000-000009-000001.dcm... (5 Replies)
Discussion started by: goodbenito
5 Replies
7. Shell Programming and Scripting
I am trying to delete a pattern without removing line. I searched a lot in this forum and using those I could come up with sed command but it seems that command does not work. Here's how my file looks like:
1 ./63990 7
1171 ./63990 2
2425 ./63990 9
2539 ./63990 1
3125 ./63990 1
10141... (7 Replies)
Discussion started by: shoaibjameel123
7 Replies
8. Shell Programming and Scripting
hi All,
i want to add the single digit front of the line in the report file and string compare with pattern file.
patter file: pattern1.txt
pattern num
like 4
love 3
john 2
report file: report.txt
i like very much
but john is good boy
i will love u
so after execute... (9 Replies)
Discussion started by: krbala1985
9 Replies
9. Shell Programming and Scripting
Hi All,
I have written the below script that searches for the pattern in a file and delete them if present. please can some one have a look and suggest the changes in the script.
#!bin/sh
# The pattern that user want to add to the files
echo "Enter the pattern of the redirect"
read... (4 Replies)
Discussion started by: Shazin
4 Replies
10. Shell Programming and Scripting
I have a problem in searching a specific pattern in c files.
My requirement:
I have to find all the division operator in all cfiles.
The problem is, the multi line comments and single line comments will also have forward slash in it.
Even after avoiding these comments also, if both... (6 Replies)
Discussion started by: murthybptl
6 Replies