10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have the following text as an input text:
input.txt
Results('Toilet', 'Sink', )
and i want to remove the last comma so the output is
output.txt
Results('Toilet', 'Sink' )
I tried using the following sed command, but I get a parsing error:
sed s/, \)/\)/g input.txt >... (5 Replies)
Discussion started by: jl487
5 Replies
2. UNIX for Dummies Questions & Answers
I have a huge file
which is pipe delimiter and i want to replace the pipe delimiter to a comma
Please Help as its v urgent.
Ex: parent|child|alias|....Heading of the file...and the data is of similar structure. (4 Replies)
Discussion started by: win4luv
4 Replies
3. Shell Programming and Scripting
Hello everyone,
I want to replace all "," (commas) with a blank space
My command thus far is:
cat test.text | sed -e s/\`//g | awk '{print$1" "$2" "$3}'
I'm sure you guys know this, but the SED command that I am using is to get rid of the "`" (tics).
which gives me:
name ... (5 Replies)
Discussion started by: jayT
5 Replies
4. Shell Programming and Scripting
If the string is of the pattern XxxXyzAbc...
The expected out put from sed has to be Xxx Xyz Abc ...
eg: if the string is QcfEfQfs, then the expected output is Qcf Ef Efs.
If i try to substitute the pattern with space then the sed will replace the character or pattern with space,... (1 Reply)
Discussion started by: frozensmilz
1 Replies
5. Shell Programming and Scripting
hi
i want to replace spaces by comma
my file is
ADD 16428 170 160 3 WNPG 204 941 No 204802
ADD 16428 170 160 3 WNPG 204 941 No 204803
ADD 16428 170 160 3 WNPG 204 941 No 204804
ADD... (9 Replies)
Discussion started by: raghavendra.cse
9 Replies
6. UNIX for Advanced & Expert Users
I would like to replace the value of * (which might have one or more whitespace(s) before and after *) using sed command in aix.
Eg: Var='Hi I am there *
Desired output: Hi I am there* (1 Reply)
Discussion started by: techmoris
1 Replies
7. UNIX for Dummies Questions & Answers
Hi all,
I'm hoping you can help.. I've used this forum a couple of times and I am back again now i've moved onto something more complex (for me!)
I have some data which looks like:
"AL1_1,AL1_1,"
"AL1_1.AL1_1A.AL1_1AE,AL1_1AE,"
"AL1_1.AL1_1A.AL1_1AG,AL1_1AG,"
"AL1_1.AL1_1A.AL1_1AJ,AL1_1AJ,"... (10 Replies)
Discussion started by: gman
10 Replies
8. Shell Programming and Scripting
I wanted to change 34.66 to 34,66.
I tried the command: sed 's/./,/' $NUM
Where $NUM is a variable with 34.66 value.
The output is ,4.66 (2 Replies)
Discussion started by: bdalmeida
2 Replies
9. UNIX for Dummies Questions & Answers
Hi All,
i have a file test.txt as shown below,
1,test,test111
2,rest,rest222
i want to replace the commas by tab delimiter..,
it should be like,
1 test test111
2 rest rest222
i tried the following code,
sed 's/,/\\t/g' test.txt >> ouptut.txt (9 Replies)
Discussion started by: Serious Sam
9 Replies
10. Shell Programming and Scripting
Hi All,
silly question that I'm sure is easy to answer for a more experienced coder...
I have a file called test.txt containing the following text...
need, to, break, this, line, into, individual, lines
using sed, I'd like to make the file look like this...
need
to
break
this
line... (5 Replies)
Discussion started by: newbie_coder
5 Replies