10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
How can I change the comma sign (,) to plus sign (+) with the sed command or any regex?
I mean to change only the comma that beteen the quotation marks.
From this file:
A,B,C
A,"B,C",D
"A,B",C,D
A,B,"C,D"
To this file:
A,B,C
A,"B+C",D
"A+B",C,D
A,B,"C+D" (6 Replies)
Discussion started by: elior
6 Replies
2. Shell Programming and Scripting
Hi Everyone,
I need some help with sed and I'm totally new to it.
I have a template file with variables in it. These variables start with a '$' sign and are exactly one character long (plus the '$' sign). For example: $a, $b, etc.
Each variable should be replaced with the contents of a... (9 Replies)
Discussion started by: csarli2006
9 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I want to use sed to replace " /// " with "///" in a text file. However I am getting error messages when I use sed 's/ /// /////g' input.txt > output.txt. How do I go about doing this in sed?
Input:
219518_s_at 0.000189 ELL3 / SERINC4
Output:
219518_s_at 0.000189 ELL3/SERINC4 (5 Replies)
Discussion started by: evelibertine
5 Replies
4. Shell Programming and Scripting
Hi guys,
Hi have this input (Menu.xml)<?xml version="1.0" encoding="ISO-8859-1"?>
<breakfast_menu>
<food>
<name>Berry-Berry Belgian Waffles</name>
<price>$8.95</price>
<calories>900</calories>
</food>
<food>
<name>French Toast</name>
... (6 Replies)
Discussion started by: cgkmal
6 Replies
5. Shell Programming and Scripting
Hi!
I have this shell script that I need to finish. Currently I need to fix one line to make it work. I need to change a file extension. See this code, is pretty simple.
#!/bin/sh
# Extensions
OLD_EXT=.flv
NEW_EXT=.mp4
COUNT_FILES=$(ls -l *$OLD_EXT | grep ^- | wc -l)
if ; then
... (8 Replies)
Discussion started by: pulsorock
8 Replies
6. Shell Programming and Scripting
Hi Everyone,
I am new to this forum and new to sed/awk programming too !!
I need to find particular string in file1(text file) and replace it with a value from another text file(file2) the file2 has only one line and the value to be replaced with is in the second column.
file 1:
(assert (=... (21 Replies)
Discussion started by: paramad
21 Replies
7. Shell Programming and Scripting
I have got problems saving sed changes to the same file in a loop.
Basically I want the delimited value in every line of the file to be set to blank according to the value stored in var. var can be changed anytime.
I do not have sed -i and i've tried to mv the file. Any other ideas?
My file... (8 Replies)
Discussion started by: alienated
8 Replies
8. Shell Programming and Scripting
How do i replace a string using sed into the same file without creating a intermediate file? (7 Replies)
Discussion started by: gomes1333
7 Replies
9. Shell Programming and Scripting
Okay, title is kind of confusion, but basically, I have a lot of scripts on a server that I need to replace a ps command, however, the new ps command I'm trying to replace the current one with pipes to sed at one point. So now I am attempting to create another script that replaces that line.
... (1 Reply)
Discussion started by: cbo0485
1 Replies
10. Shell Programming and Scripting
I have file with 70 lines.
I want to add 'SLV' at the starting of the line if the line has first character as 0 or 1 or 2 or ..9
Nothing else has to be changed in the file. Please anyone advice. (5 Replies)
Discussion started by: senthil_is
5 Replies