10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Looking to add text to a file, example
File example;
nodegroups:
check-hosts: L@host.domain.com,host2.domain.com,host3.domain.com
I need to take a file with a one line list of hosts separated by commas
host.domain.com,host2.domain.com,host3.domain.comand prepend the string " ... (6 Replies)
Discussion started by: bash_in_my_head
6 Replies
2. Shell Programming and Scripting
I have an input file which is similar to what I have shown below.
Pattern : Data followed by two blank lines followed by data again followed by two blank lines followed by data again etc..
The first three lines after every blank line combination(2 blank lines between data) should be... (2 Replies)
Discussion started by: bikerboy
2 Replies
3. Shell Programming and Scripting
I am trying to replace in multiple files every instance of text that begins with http and add hyperlink characters to it. I can get it to work with the following:sed -e "s/http*.*/<a href=\"&\">&<\/a>/g" *
as long as the http text is at the end of the file. I need it to stop at the end of the... (2 Replies)
Discussion started by: numele
2 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
Hi all,
I have a file like
one two three for
five six seven eight
.....
Actually i need to append a label to the words that belong to the 2 column and get:
one two_label three for
five six_label seven eight
....
I was trying with sed inside vim but I can't figure out... (9 Replies)
Discussion started by: Dedalus
9 Replies
6. Shell Programming and Scripting
hi,
anyone can give a sample command on sed. the text file date list belows;
test.txt
"a","bbb",123
"b","ccc",234
"c","eee",456
output i need to add these word "xxx"
"xxx","a","bbb",123
"xxx","b","ccc",234
"xxx" ,"c","eee",456
thanks in advance,
FSP (4 Replies)
Discussion started by: fspalero
4 Replies
7. Shell Programming and Scripting
Hello all,
I want to use sed to append a variable stored in $i, how do i do that?
$i contains a path to a directory and i want to append it before the result i get from awk statement, before affecting awk results.
rite now out put i get from code below is:-
The path is:... (2 Replies)
Discussion started by: asirohi
2 Replies
8. Shell Programming and Scripting
Hi,
How can I remove the line beak in the following case if the line begin with the special char “;”?
TEXT
Text;text
;text
Text;text;text
I want to convert the text to:
Text;text;text
Text;text;text
I have already tried to use... (31 Replies)
Discussion started by: research3
31 Replies
9. Shell Programming and Scripting
I have the following data in a file and would like to append the lines inside each section 10, 20, 30, 40, etc... onto one line for each of the sections. Is it possible with SED to make this happen??
10 00039393 DOCK: RECEIVE PART, TAG. D D
... (3 Replies)
Discussion started by: miklacic
3 Replies
10. Shell Programming and Scripting
Hello ,
I have the folloiwing command :
sed -n "$var,$final w $destfile" $sourcefile
where :
$var - $final represent the range of line numbers to be written in $destfile
However I require this command to work in a loop for which i need the sed command to keep appending the output to the... (2 Replies)
Discussion started by: shweta_d
2 Replies