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. UNIX for Dummies Questions & Answers
Hi
My input file looks like this:
>BAHMI01000090.1 Details of the shopping list 9800 item00090, whole set of listed artifacts and objects
>BAHMI01050012.1 Details of the shopping list 9800 item02310, whole set of listed artifacts and objects
>BAHMI01070078.1 Details of the shopping list ... (5 Replies)
Discussion started by: sonia102
5 Replies
3. Shell Programming and Scripting
The sample file:
dept1: user1,user2,user3
dept2: user4,user5,user6
dept3: user7,user8,user9
I want to match by '/^dept2.*/' but don't want to have substring 'dept2:' in output. How to compose such regex? (8 Replies)
Discussion started by: urello
8 Replies
4. Shell Programming and Scripting
Hi
We have a tool to monitor logs in our environment. The tool accepts log pattern match only using regex and I accept I am a n00b in that:confused:. I had been banging my head to make it work without much success and at last had to turn on to my last option to post it here. I had got great... (2 Replies)
Discussion started by: radioactive9
2 Replies
5. UNIX for Dummies Questions & Answers
Hi All
This might be a weird query but its related to deleting specific details in database.
Bascially I had built a database using a set of files
seq1 of 300 mb
seq2 of 200 mb
seq3 of 350 mb
seq4 of 300 mb
and after building the database i realized that i didn't need the whole data.... (6 Replies)
Discussion started by: sonia102
6 Replies
6. UNIX for Dummies Questions & Answers
Hi All.
I didnt know how to put this question as but i want to delete my values following string_X but need to retain the data in it.
I hope the following might help me in conveying my doubt.
My sequence looks like this.
>string_1 CAJW010000001... (3 Replies)
Discussion started by: sonia102
3 Replies
7. Shell Programming and Scripting
Hi
I am having a code snippet
grant permission to all user
sts|ln|uSe|PSG
sajncht|se|Use|PPSPSG
psg|ln|use|TSPSG
sts_user.Me revoke
I need to change all occurance of use (uSe,Use,use) with USE. I am using the following sed command for this
sed 's//USE/g' s_sample.txt
Output: (7 Replies)
Discussion started by: sudeep.id
7 Replies
8. 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
9. UNIX Desktop Questions & Answers
Trying to delete a directory or a file using a pattern-selective deletion (using “*” and “?” ) (4 Replies)
Discussion started by: herberwz
4 Replies
10. Shell Programming and Scripting
Hi,
I have file 1.txt with following entries as shown:
0152364|134444|10.20.30.40|015236433
0233654|122555|10.20.30.50|023365433
**
**
**
In file 2.txt I have the following entries as shown:
0152364|134444|10.20.30.40|015236433
0233654|122555|10.20.30.50|023365433... (4 Replies)
Discussion started by: imas
4 Replies