10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I would like produce
blue, green, red, yellowfrom"blue:,*green:,*red:,*yellowI can remove the colon with
echo "blue:,*green:,*red:,*yellow" | sed 's/://g'which givesblue,*green,*red,*yellowbut when I try
echo "blue:,*green:,*red:,*yellow" | sed 's/://g'; 's/*//g'I get bash: s/*//g: No such... (9 Replies)
Discussion started by: Xubuntu56
9 Replies
2. Shell Programming and Scripting
I have a big xmltv file with many lines like:
<?xml version="1.0" encoding="UTF-8"?>
<tv>
<channel id="channel 1 +3HD">
<display-name lang="it">channel +3HD</display-name>
<icon src="http://mywebsite.com/dsgbnjfdc65657/channel +3HD.png" />
... (8 Replies)
Discussion started by: Tapiocapioca
8 Replies
3. Answers to Frequently Asked Questions
hello,
I'm using sed command to extract the text between 2 special characters which are /* and */
I used following command to do this.
sed -n '/\/\*/,/\*\//p' file.txt
But if the file.txt contains a line something like this,
a=5; /* this is a comment */
the above command... (3 Replies)
Discussion started by: beginner_99
3 Replies
4. Shell Programming and Scripting
I have file like below
Hi iam author <br>joseph</br> in france.
I live in my home <br></br> but no food.
I will play footbal <br></br> but i wont play cricket.
I will read all the books <br>all fiction stories</br> i hate horror stories.
I want output like below
Hi iam author... (3 Replies)
Discussion started by: vinothsekark
3 Replies
5. Shell Programming and Scripting
Hi guys,
I have a txt file full of funny symbols like the copyright symbol and other funny ones that get in the way when trying to use sed. For example, not sure if you can read this but I have a line that looks like this:
24(9):995Â*1001 DOI: 10.1007/s11606-009-1053-2 ©
When I'm using... (1 Reply)
Discussion started by: joshdg
1 Replies
6. Shell Programming and Scripting
Hi all,
I've got a problem with sed. Want to use it to add escape character \ before $ and ' symbols so
condition='1'$some will become condition=\'1\'\$some
echo "condition='1'$some" | sed 's/\($\)/\\\1/g'
is not working properly. Can somebody help me with this please?
Regards,... (7 Replies)
Discussion started by: johny_be_good
7 Replies
7. Shell Programming and Scripting
I have a source text file that contains something like this:
<start_template>
bool function( void *<var_name> )
{
// Blah Blah
}
</start_template>
Following is used to remove this template from source file.
template=$(sed -n -e '/<start_template>/,/<\/start_template>/{... (4 Replies)
Discussion started by: gee22
4 Replies
8. Shell Programming and Scripting
Hi, I would like to know how could I remove accentes and the symbols: º and ª of a text file with sed. Whis this command doesn't works :-( sed "s/í/i/g" filename Many thanks and sorry for my english! (7 Replies)
Discussion started by: mierdatuti
7 Replies
9. Shell Programming and Scripting
Hi all,
I need your help.
For example I have string in file.txt:
-x -a /tmp/dbarchive_NSS_20081204 -f 900 -l 1 2008/12/04 2008/12/04
So, I need to replace symbols from (for e.g.) position 26 till 33 with symbols which I have in file replace.txt
And I have no idea how to do it.
If... (1 Reply)
Discussion started by: nypreH
1 Replies
10. Shell Programming and Scripting
I want to edit a huge script file using sed. How can I add the new lines symbols in the red colored places?
sed -e "s/test -z "$x"/if test -z "$x" then echo -1; \n else \n/g" (1 Reply)
Discussion started by: gogogo
1 Replies