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. Programming
Dear all,
I am kindly seeking assistance on the following issue.
I am working with data that is sampled every 0.05 hours (that is 3 minutes intervals) here is a sample data from the file
5.00000 15.5030
5.05000 15.6680
5.10000 16.0100
5.15000 16.3450
5.20000 16.7120
5.25000... (4 Replies)
Discussion started by: malandisa
4 Replies
3. Shell Programming and Scripting
Hello all,
I need some help please.
I got file1 with names.
foo bar
foo bar
foo bar
foo bar
foo bar
and I got file2 with some text
some text
some text
#KEYWORD
some text
some text
some text (3 Replies)
Discussion started by: stinkefisch
3 Replies
4. 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
5. 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
6. 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
7. Shell Programming and Scripting
Hi,
I want to replace _F* by _F in a xml file. what is the sed command.
I have tried sed "s/_F$/_F/g" or sed "s/_F*/_F/g" , but it does not work. thx
file content
<TAG>KC_FOU</TAG>
<TAG>KC_FABC</TAG>
<TAG>KC_FABCDG</TAG>
desire output
<TAG>KC_F</TAG>
<TAG>KC_F</TAG>
<TAG>KC_F</TAG> (6 Replies)
Discussion started by: godfreyyip
6 Replies
8. 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
9. UNIX for Dummies Questions & Answers
lets see if i can explain this in a good way.
im trying to replace some words in a file but i need to know what the words are that is beeing replaced. not sure if sed can do this.
file.name.something.1DATA01.something.whatever
sed "s/./.DATA?????/g"
need to know what the first . is... (2 Replies)
Discussion started by: cas
2 Replies
10. Shell Programming and Scripting
Hi, I am trying to write a script that will replace "PermitEmptyPasswords yes" with "PermitEmptyPasswords no". The following does not seem to work: -
sed 's!/"PermitEmptyPasswords yes"/!/"PermitEmptyPasswords no"/!'
Appreciate any ideas.
Thanks (2 Replies)
Discussion started by: mtech3
2 Replies