10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
We are using Red Hat Linux.
I have a flat file with among other things, the following lines, which appear occasionally throughout the file:
Using sed, I delete this line:
L;L;L;L;R;R;R;L;R;L;R;R;R;L;L;L
With:
/^;;;;;*/d
Works fine every time.
However, I cannot delete... (6 Replies)
Discussion started by: bloomlock
6 Replies
2. 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
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. 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
5. 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
6. Shell Programming and Scripting
I have a txt file with more than 10000 lines. There is a unique pattern which is scattered into the file. it starts with @9 and it has 15 characters. i need to grep them and display along with line numbers.
Eg: File - Test1
test message....
....
..
..
@9qwerty89
...test message... (8 Replies)
Discussion started by: abinash
8 Replies
7. Shell Programming and Scripting
Hi All,
Please can someone assist in the script I have made that searches a pattern in a file and delete the whole line containing the pattern.
#!bin/sh
# The pattern that user want to add to the files
echo "Enter the pattern of the redirect"
read value
# check if the user has... (1 Reply)
Discussion started by: Shazin
1 Replies
8. Shell Programming and Scripting
hi all,
was wanting to know how to search for decimal numbers in a file ? am using solaris 8 and have tried a few options with "grep" but none of them seem to work.
thanks in advance. (1 Reply)
Discussion started by: cesarNZ
1 Replies
9. 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
10. Shell Programming and Scripting
Hi,
I have a file on windows and have some unix utilitties available on windows. This file is very large and have over 5 million record. I am not able to open this file in Window Editor. I am trying to see bad data on a specific lines. I just have line numbers that has bad data. I need to see the... (8 Replies)
Discussion started by: rkumar28
8 Replies