09-10-2007
I tried sed but \t didn't work
but in awk print "\t" works
so I used this one it worked ,it may be used somewhere;
sed "s/,/`awk 'BEGIN{print "\t"}'`/g inputfile
-or-
sed "s/,/`echo "\t"`/g" inputfile
Last edited by fazliturk; 09-10-2007 at 10:39 AM..
10 More Discussions You Might Find Interesting
1. 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
2. Shell Programming and Scripting
hi all,
i have a file with commas(,). i want to replace all the commas with tab(\t).
Plz help...its urgent... (3 Replies)
Discussion started by: vikas_kesarwani
3 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. 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
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. UNIX for Dummies Questions & Answers
How can i make a tab delimiter file to a comma delimiter??? (13 Replies)
Discussion started by: saggiboy10
13 Replies
8. Shell Programming and Scripting
Hi all,
How can i convert comma delimited .csv file to tab separate using sed command or script.
Thanks,
Krupa (4 Replies)
Discussion started by: krupasindhu18
4 Replies
9. 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
10. Shell Programming and Scripting
Hi
I am working on xml file. I have to make sure below lines containing values within quotes are replaced by some character like "-".
Below are different lines in xml file.
Pattern 1:
<Connector port=....
.....
keystoremyPass="xxx" />
Pattern 2:
myword="xxxxx"
... (11 Replies)
Discussion started by: krsnadasa
11 Replies
TASKS(3) User Contributed Perl Documentation TASKS(3)
NAME
TASKS - Want to help? These things need doing...
Increase test coverage
More tests need to be added to test the codes that not urrently being tested.
It's pretty poor right now:
http://pjcj.sytes.net/cover/latest/DBI-1.52/coverage.html
Start with improving the subroutine coverage
http://pjcj.sytes.net/cover/latest/DBI-1.52/blib-lib-DBI-pm--subroutine.html
Test the proxy
The current t/80proxy.t is isolated from the rest of the test suite so actually tests very little, and what it does test is duplicating
other tests.
Ideally the proxy should be tested in the same way as DBI::PurePerl. In other words, by creating wrappers test files for each test file
that set $ENV{DBI_AUTOPROXY} and run the original test. They'll also need to start and stop a proxy server.
Fixing bugs
The official bug list is here:
http://rt.cpan.org/NoAuth/Bugs.html?Dist=DBI
Naturally I'll offer direction and guidance on any you want to tackle. I've also got a few that could be entered into rt.cpan.org.
Others
General:
Protect trace_msg from SIGPIPE?
prepare(...,{ Err=>my $isolated_err, ...})
Add trace module that just records the last N trace messages into an array
and prepends them to any error message to provide context for the error.
Document DBI_PROFILE_FLOCK and LockFile attrib in DBI::ProfileData and DBI::ProfileDumper
Performance:
Move _new_sth to DBI::db::_new_sth (leave alias) and implement in C
Or call _new_child and move to DBI::common?
Implement FETCH_many() in C
Add high-res dbi_time for windows - via Time::HiRes glob replace dbi_time()?
perl v5.12.1 2009-06-08 TASKS(3)