06-16-2016
I understand that there are many new things for you to come to grips with. Did you try any of the proposals and comprehend the results? Why don't you post those and your pertaining questions?
Do you understand the concept of "addresses" in sed? The concept of regexes and details hereof (like [Dd], meaning one single char, either "D" or "d")?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi everyone
I just need a script that should just search for a particular keyword in a line and after that it should add some text to the next line.
I have tried it in HAMILTON CSHELL using
sed "hello/a\newtext" file.txt
But it give me message
sed: "\" must terminate the "a"... (4 Replies)
Discussion started by: sarbjit
4 Replies
2. UNIX for Dummies Questions & Answers
Hi all
I tried this on an old version of sed on NCR Unix MP-RAS:
sed -e "s/$/nnn/" file1 >file2
This file (file1):
the cat sat on the mat.
the cat sat on the mat.
the cat sat on the mat.
becomes this (file2):
the cat sat on the mat.nnn
the cat sat on the mat.nnn
nnn
the... (3 Replies)
Discussion started by: jgrogan
3 Replies
3. Shell Programming and Scripting
Hi All
I'm trying to insert a pattern if a pattern is found in a file.
This is my sample file
"PDA"|"Celvin"|"PRJ_NA"|"Completion_Units"|25
"PDA"|"Celvin"|"PRJ_AB"|"Completion_Units"|250
I would like to output as
"PDA"|"Celvin"|"PRJ_NA"|"Completion_Units"|"Done"|25... (3 Replies)
Discussion started by: Celvin VK
3 Replies
4. Shell Programming and Scripting
Input:
gstreamer-plugins-good
gstreamer-plugins-bad
gstreamer-plugins-ugly
Output should be:
gstreamer-plugins-good gstreamer-plugins-bad gstreamer-plugins-ugly
How can it be done with sed? (5 Replies)
Discussion started by: cola
5 Replies
5. Shell Programming and Scripting
I have a file like below
#GROUP A belongs to Asia
GROUP A jojh hans local admin
GROUP A gege fans michel jing jong
#GROUP U belongs to USA
GROUP U jeff goal hello world
My requirement is to grep for first apperence of GROUP A which is not commented and append my name to end of file.... (12 Replies)
Discussion started by: vkk
12 Replies
6. Shell Programming and Scripting
After I create printer queues in AIX, I have to append a filter file location within that printers custom file. within lets say test_queue.txt I need to find the row that starts with :699 and then I need to append on the end the string /usr/local/bin/k_portrait.sh.
Now I've gotten the sed... (2 Replies)
Discussion started by: peachclift
2 Replies
7. Shell Programming and Scripting
im trying to append to the end of the line using sed but I want to do it without creating a new line
the text to which I want to append is all in capital letters.
I want to do something like this:
LINE]Foo
but when I do this:
//a\
] Foo
it prints foo on a new line:
LINE
]Foo
... (11 Replies)
Discussion started by: mrjavoman
11 Replies
8. Shell Programming and Scripting
Hi,
I have a File, which have multiple rows.
Like below
123456 Test1 FNAME JRW#$% PB MO Approver XXXXXX. YYYY
123457 Test2 FNAME JRW#$% PB MO Super XXXXXX. YYYY
123458 Test3 FNAME JRW#$% PB MO Approver XXXXXX. YYYY
I want to search a line which contains PB MO Approver and append... (2 Replies)
Discussion started by: java2006
2 Replies
9. Shell Programming and Scripting
Hi, I posted in another section, but no reply yet.
I have an ini file with sections denoted as follows (for example)
blah=blah
blee=blee
bloo=bloo
blur=blur
blaa=blaa
I have ksh script that needs to append a line ${line} to the end of section ${section}
I saw this... (7 Replies)
Discussion started by: andyatit
7 Replies
10. Shell Programming and Scripting
Hello.
I have a config file (/etc/my_config_file) which may content :
#
# port for HTTP (descriptions, SOAP, media transfer) traffic
port=8200
# network interfaces to serve, comma delimited
network_interface=eth0
# set this to the directory you want scanned.
# * if have multiple... (6 Replies)
Discussion started by: jcdole
6 Replies