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. Shell Programming and Scripting
Hi,
I have a file with multiple lines(fixed width dat file). I want to search for '02' in the positions 45-46 and if available, in that lines, I need to replace value in position 359 with blank. As I am new to unix, I am not able to figure out how to do this. Can you please help me to achieve... (9 Replies)
Discussion started by: Pradhikshan
9 Replies
4. UNIX for Dummies Questions & Answers
Hi I am trying to remove all the symbols in a file (testfile1) and using the below command to do that. Its not working for me. Can you help me on what is wrong with below script?
I want to retain only alphabets in a file and remove all the symbols like *:.+= etc
sed 's/^.//g' testfile1 > testfile2 (4 Replies)
Discussion started by: sandeepcm
4 Replies
5. Shell Programming and Scripting
here is what i want to achieve... consider a file contains below contents. the file size is large about 60mb
cat dump.sql
INSERT INTO `table1` (`id`, `action`, `date`, `descrip`, `lastModified`) VALUES (1,'Change','2011-05-05 00:00:00','Account Updated','2012-02-10... (10 Replies)
Discussion started by: vivek d r
10 Replies
6. Shell Programming and Scripting
I asked this before, but my problem got more complicated. Heres what I am trying to do:
I'm trying to replace a string at a certain location with another string.
Heres the file I'm trying to change:
\E
I want to replace the escape code at the 3rd line, 2nd column with this escape code... (3 Replies)
Discussion started by: tinman47
3 Replies
7. Shell Programming and Scripting
I'm drawing a blank on how to use sed to replace selectively based on position in the string (vs nth occurence):
hello.|there.|how.|are.|you.|
I want the period removed in the 3rd item (as defined by the pipe delimiter) if a period is present. So the result in this case would be:
... (2 Replies)
Discussion started by: tiggyboo
2 Replies
8. Shell Programming and Scripting
I want to remove text from nth position to nth position couple of times in same line
my line is
"hello is there anyone can help me with this question"
I need like this
ello is there anyone can help me with question
'h' is removed and 'this' removed from the line. I want to do this... (5 Replies)
Discussion started by: elamurugu
5 Replies
9. Shell Programming and Scripting
I am trying to use sed to replace specific characters at a specific position in the file with a different value... can this be done?
Example:
File:
A0199999123
A0199999124
A0199999125
Need to replace 99999 in positions 3-7 with 88888.
Any help is appreciated. (5 Replies)
Discussion started by: programmer22
5 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