10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file
Line 1 a
Line 22
Line 33
Line 1 b
Line 22
Line 1 c
Line 4
Line 5
I want to delete all lines before last occurrence of a line which contains something which is defined in a variable. Say a variable var contains 'Line 1', then I need the following in the output.
... (21 Replies)
Discussion started by: Soham
21 Replies
2. Shell Programming and Scripting
Hello Experts , require help . See below output:
File inputs
------------------------------------------
Server Host = mike
id rl images allocated last updated density
vimages expiration last read <------- STATUS ------->... (4 Replies)
Discussion started by: tigerhills
4 Replies
3. Shell Programming and Scripting
BASH in Solaris 10
I have a log file like below. Whenever the pattern ORA-39083 is encountered, I want to delete the line which has this pattern and 3 lines below it.
$ cat someLogfile.txt
ORA-39083: Object type OBJECT_GRANT failed to create with error:
ORA-01917: user or role 'CMPA' does... (4 Replies)
Discussion started by: kraljic
4 Replies
4. Shell Programming and Scripting
i need to search for a pattern from a big file and print everything expect the next 6 lines from where the pattern match was made. (8 Replies)
Discussion started by: chidori
8 Replies
5. Shell Programming and Scripting
Hi
Im trying to do the following in sed. I want to delete any blank line at the start of a file until it matches a pattern and then stops. for example:
Input
output:
I have got it to work within a range of two patterns with the following:
sed '/1/,/pattern/{/^]*$/d}'
The... (2 Replies)
Discussion started by: duonut
2 Replies
6. Shell Programming and Scripting
Hello sed gurus. I am using ksh on Sun and have a file created by concatenating several other files. All files contain header rows. I just need to keep the first occurrence and remove all other header rows.
header for file
1111
2222
3333
header for file
1111
2222
3333
header for file... (8 Replies)
Discussion started by: gary_w
8 Replies
7. Shell Programming and Scripting
I have this input file that I need to remove lines which represents more than 30 days of processing.
Input file:
On 11/17/2009 at 12:30:00, Program started processing...argc=7
Total number of bytes in file being processed is 390
Message buffer of length=390 was allocated successfully... (1 Reply)
Discussion started by: udelalv
1 Replies
8. Shell Programming and Scripting
First of all, I know this can be more eassily done with perl or other scripting languages but, that's not the issue. I need this in sed. (or wander if it's possible )
I got a file (trace file to recreate the control file from oracle for the dba boys)
which contains
some lines
another line... (11 Replies)
Discussion started by: plelie2
11 Replies
9. Shell Programming and Scripting
hi,
i am parsing a file, in that searching for lines those contains "$threadNo.Received message:" , if that line contains the required fields write them into a separate file other wise ignore them.
i am using the following code,but it is printing all the lines , i dont want to rpint , please help... (3 Replies)
Discussion started by: Satyak
3 Replies
10. Shell Programming and Scripting
Hi all,
I have the following data in a file x.csv:
> ,this is some text here
> ,,,,,,,,,,,,,,,,2006/11/16,0.23
> ,,,,,,,,,,,,,,,,2006/12/16,0.88
< ,,,,,,,,,,,,,,,,this shouldnt be deleted
I need to use SED to match anything with a > in the line and delete that line, can someone help... (7 Replies)
Discussion started by: not4google
7 Replies