10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hello Team,
I am looking for sed command or script which will append word at end of line. for example. I want to validate particular filesystem with mount |<filesystem name> command. if nodev parameter is not there then it should add in the fstab file with receptive to the filesystem.
# mount... (8 Replies)
Discussion started by: ghpradeep
8 Replies
2. UNIX for Beginners Questions & Answers
Hi Folks ,
I have to replace the following value in all the xml files so the value is
tcp://pondevpms1.fm.rbsgrp.net:6033,pondevpms2.fm.rbsgrp.net:6033
and the value with it need to be replaces is shown below
tcp://pondevpms1:3063
so i have fired the below command inside... (3 Replies)
Discussion started by: unclesamm
3 Replies
3. Shell Programming and Scripting
Hi All,
I have a file where I am converting newlines to comma separated values but I would like to append zero if the output is empty
Here is the command I am using
sed -n -e 'H;${x;s/\n/,/g;s/^,//;p;}' test1.txt
test1.txt will have comma seperated values but sometimes this file can be... (6 Replies)
Discussion started by: rajeevm
6 Replies
4. Shell Programming and Scripting
HELLO!!
I'm trying to pass a variable with in the 'sed' command (which would add some piece of code to file at a particular line). We can use
sed '{line-number}a\
alfjaljf\
aslfjsfsjafl\
adlfjaf\' file.txt
If file.txt is
Now, I would like to add the parameter 'lmn' after... (1 Reply)
Discussion started by: mjavalkar
1 Replies
5. Shell Programming and Scripting
Hello All,
I am running a command find . -name amp.cfg | cut -c 3- which gives me output something like below
rel/prod/amp.cfg
rel/fld/amp.cfg
deb/detail/amp.cfg
deb/err/amp.cfg I want to remove trailing "/amp.cfg" so that i should get output something like... (7 Replies)
Discussion started by: anand.shah
7 Replies
6. Shell Programming and Scripting
Hi,
I have been trying to replace the key word
"SQL> spool off "
with
"/
show errors"
with out double quotes in all the files in a directory.
above show erros should be displayed next line
Could you please help me how to do that.
I have tried something like this... (3 Replies)
Discussion started by: pointers
3 Replies
7. Shell Programming and Scripting
My source is on each line
98.194.245.255 - - "GET /disp0201.php?poc=4060&roc=1&ps=R&ooc=13&mjv=6&mov=5&rel=5&bod=155&oxi=2&omj=5&ozn=1&dav=20&cd=&daz=&drc=&mo=&sid=&lang=EN&loc=JPN HTTP/1.1" 302 - "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.0.3705; .NET CLR... (5 Replies)
Discussion started by: elamurugu
5 Replies
8. Shell Programming and Scripting
Hello to all,
On aix, I want to identify a term on a line in a file and then add a word at the end of the line identified. I do not want the word to be added when the line contains the symbol "#".
I use the following command, but it deletes the term identified then adds the word.
#sed... (4 Replies)
Discussion started by: dantares
4 Replies
9. Shell Programming and Scripting
I want to write a sed command that does the following work:
file: <a>asdfasdf<\s>
<line>hello</line>
<b>adf<\c>
<b>tttttttt<\c>
output:
name=hello
sed -e 's/^*//' -n -e '/<line>/s/<*>//gp;' -e 's/^/name="/g' file
but I can not append "=" after getting the line with... (5 Replies)
Discussion started by: minifish
5 Replies
10. UNIX for Dummies Questions & Answers
Hi all,
Can someone suggest how to append some word to all lines in file. for example word "Honey" to file f1 with lines:
Mia
Katrin
Elizabeth
to get
Honey Mia
Honey Katrin
Honey Elizabeth
Thanks in advance
Givi (3 Replies)
Discussion started by: giviut
3 Replies