10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I am able to grep multiple patterns which stored in a files. However, how could we replace the whole line with either the pattern or new string?
For example:
pattern_file: *Info in the () is not part of the pattern file. They are the intended name to replace the whole line after the pattern... (5 Replies)
Discussion started by: wxboo
5 Replies
2. AIX
Hi All,
I have a requirement to replace consecutive occurence of same string nedd to be replaced. Below is the input and desired output.
Input:
---------
123.5|ABC|.|.|.
234.4|DEF|.|.|.|.|.|
Output:
---------
123.5|ABC|||.
234.4|DEF|||||
so basically "|.|" need to be replaced with... (9 Replies)
Discussion started by: ureddy
9 Replies
3. Shell Programming and Scripting
say we have :
2914 | REQUEST | whatever
2914 | RESPONSE | whatever
2914 | SUCCESS | whatever
2985 | RESPONSE | whatever
2986 | REQUEST | whatever
2990 | REQUEST | whatever
2985 | RESPONSE | whatever
2996 | REQUEST | whatever
2010 | SUCCESS | whatever
2013 | REQUEST | whatever
2013 |... (7 Replies)
Discussion started by: Saumitra Pandey
7 Replies
4. UNIX for Dummies Questions & Answers
I have a text file that is about 90,000 lines long. How would I delete lines 64-89, 152-177, 240-265, 328-353... etc? The sections I would like to delete are 26 lines long and the number of lines between the sections I would like to delete is 62 lines. Thanks very much in advance. (6 Replies)
Discussion started by: MDeBiasse
6 Replies
5. Shell Programming and Scripting
Hello,
I want to extract from a file like :
20120530025502914 | REQUEST | whatever
20120530025502968 | RESPONSE | whatever
20120530025502985 | RESPONSE | whatever
20120530025502996 | REQUEST | whatever
20120530025503013 | REQUEST | whatever
20120530025503045 | RESPONSE | whatever
I want... (14 Replies)
Discussion started by: black_fender
14 Replies
6. Shell Programming and Scripting
I have following pattern in a file:
00:01:38 UTC
abcd
00:01:48 UTC
00:01:58 UTC
efgh
00:02:08 UTC
00:02:18 UTC
and I need to change something like the following
00:01:38 UTC
abcd
00:01:48 UTC
XXXX
00:01:58 UTC
efgh
00:02:08 UTC
XXXX (6 Replies)
Discussion started by: jjnight
6 Replies
7. Shell Programming and Scripting
i have something like this...
cat filename.txt
<complexType name="abc">
bklah vlah
blah
blha blha blah
blha
</complexType >
<complexType name="def">
bklah vlah
blah
blha blha blah
blha
</complexType >
.
.
.and so on.. its a very large file (11 Replies)
Discussion started by: vivek d r
11 Replies
8. Shell Programming and Scripting
We have very large transaction logs that have transactions which start with a line that starts with 'Begin :' and ends with a line that starts with 'End :'. For most transactions there is valid data between those two lines.
I am trying to get rid of lines that look like this:
Begin :... (11 Replies)
Discussion started by: deneuve01
11 Replies
9. Shell Programming and Scripting
This is a variation of an earlier post found here:
unixcom/shell-programming-scripting/159821-merge-two-non-consecutive-lines.html
User Bartus11 was kind enough to solve that example.
Previously, I needed help combining two lines that are non-consecutive in a file. Now I need to do the... (7 Replies)
Discussion started by: munkee
7 Replies
10. Shell Programming and Scripting
Hello i'm writting a krn shell that will find the letter F and I would like to grab everything from F till 0:00. Is there a sed or awk command that i could use.
Thank you. File is looks like this.
11/12 xxx xxxx xxx F xxxx xxxx
some info entered here
some info entered here
xxxx... (1 Reply)
Discussion started by: wisher115
1 Replies