09-29-2008
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi everyone,
Since the previous time I received help from unix.com I have been encouraged to learn more.
going through 1 of the articles(View Article) on sed I found, it pointed an interesting situation.
Suppose the text is :
Romeo and Ethel the Dancer Moves Audience to Tears.
I... (3 Replies)
Discussion started by: hkansal
3 Replies
2. 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
3. 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
4. UNIX for Dummies Questions & Answers
Guyz
I have been using tr command to replace symbol.
I would like to add a symbol to all newlines in a textfile with out replacing them
input
\n (i mean new line)
a
\n
b
\n
c
output
>
a
>
b
>
c (0 Replies)
Discussion started by: repinementer
0 Replies
5. Shell Programming and Scripting
Hi,
How can I replace the 6th comma on each line (of a csv) with a space?
Any online tutorials with plenty of examples using sed would be very useful.
Alex (2 Replies)
Discussion started by: mcclunyboy
2 Replies
6. 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
7. Shell Programming and Scripting
Hi all,
This my requirement is to spilt the comma's into new line
my sample is
Name,india,ID,cost,Date,vadaloreOffset,neyveliCurveUnit,Riskcuddalore
,,,,,,,,,,,1,0.00576652,,,,,,,,,,,7,0.00625467,,,,,,,,,,,30,0.00832759,,,,,,,,,,,61,0.00977132
expected output to be like this... (2 Replies)
Discussion started by: koviraja
2 Replies
8. 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
9. Shell Programming and Scripting
hi
i have a requirement to replace a string with another using sed and to get the result newline separated but after sed replacement the newline vanishes
below is sample code
#!/bin/ksh
set -x
string="name sam\nage 45 \nsport soccer"
echo $string
string=`echo $string | sed... (2 Replies)
Discussion started by: midhun19
2 Replies