07-30-2013
Hi riyandgreat 25 and ripat,
Riyandgreat 25 - I want to append a character to the line before the matched line and not the matched line. Thanks so much
Ripat - your solution worked great. Thanks
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Suppose u have this file
gi_1 ABCDEFDHIJ KMNOPQRSTU VWXYZABCDE
gi_2 JKLMNOPQRS TUVWXYZABC DEFGHIJKLM
gi_3 PQRSTUVWXY ZABCDEFGHI JKLMNOPQRS
gi_4 CDEFGHIJKL MNOPQRSTUV WXYZABCDEF
gi_5 IJKLMNOPQR STUVWXYZAB CDEFGHIJKLM
FGHIJKLMNO PQRSTUVWXY ZABCDEFABC
NOPQRSTUVW XYZABCDEFG... (7 Replies)
Discussion started by: cdfd123
7 Replies
2. Shell Programming and Scripting
$ cat file1
a:23:43
A
B
C
a:24:21
a:23:44
S
D
A
F
a:24:44
a:23:45
S
D
E
a:24:45
$ cat file2
a:23:53 (1 Reply)
Discussion started by: jkl_jkl
1 Replies
3. Shell Programming and Scripting
Hi All,
I have 2 file. ACC_NUM contains only account numbers & ACC_DETAIL contains all information including account number seperated by ~ delimiter.
i am serching the account number in ACC_DETAIL from ACC_NUM. If it is exist, then copy all information in ACC_DETAIL_NEW file. For that i... (7 Replies)
Discussion started by: Amit.Sagpariya
7 Replies
4. UNIX for Dummies Questions & Answers
Hello,
My apologies if this has been posted elsewhere, I have had a look at several threads but I am still confused how to use these functions. I have two files, each with 5 columns:
File A: (tab-delimited)
PDB CHAIN Start End Fragment
1avq A 171 176 awyfan
1avq A 172 177 wyfany
1c7k A 2 7... (3 Replies)
Discussion started by: InfoSeeker
3 Replies
5. Shell Programming and Scripting
Hi guys,
anyone know how can i join multiples lines using sed till the end of a file and output to another file in a single line?
The end of each line will be replaced with a special char "#".
I am using the below SED command, however it seems to remove the last 2 lines. Also not all lines... (12 Replies)
Discussion started by: DrivesMeCrazy
12 Replies
6. Homework & Coursework Questions
Use and complete the template provided. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
I have to make as home work several commands with gerp find and sed
2. Relevant commands, code, scripts, algorithms:
FIND command
-use command find... (8 Replies)
Discussion started by: ViruS89
8 Replies
7. Shell Programming and Scripting
I have a file and need to only select users that have a shell of “/bin/bash” in the line using awk or sed please help (4 Replies)
Discussion started by: boyboy1212
4 Replies
8. UNIX for Dummies Questions & Answers
Hello,
Could someone help me with sed. I have searched for solution 5 days allready :wall:, but cant find. Unfortunately my "sed" knowledge not good enough to manage it. I have the text:
123, foo1, bar1, short text1, dat1e, stable_pattern
124, foo2, bar2, long text
with few
lines, date,... (4 Replies)
Discussion started by: petrasl
4 Replies
9. Shell Programming and Scripting
I've input as ,
abcd|
ef
123456|
78|
90
Desired output as,
abcdef
1234567890
Anyone please give the solution. (5 Replies)
Discussion started by: jinixvimal
5 Replies
10. Shell Programming and Scripting
Hi,
I have text file that looks like this:
blabla
bla
PATTERN
LINE1
LINE2
bla
bla
bla
PATTERN
LINE1
LINE2
bla
PATTERN
LINE1
LINE2
bla (9 Replies)
Discussion started by: hench
9 Replies