skip to main | skip to sidebar

DSP WORLD

Welcome to Digital Signal Processing World!

Total Pageviews

Saturday, April 4, 2009

unix script replace comma with comma follwoed by New line

cat input.txt sed 's/\,/\,\n/g'>output.txt

input.txt
a,b,c,d
output.txt
Posted by Mydream at 2:28 PM
Labels: unix script replace comma with comma follwoed by New line

2 comments:

Mydream said...

output text will be

a,
b,
c,
d

April 4, 2009 at 2:32 PM
Mydream said...

(1)csed 's/\,/\(\)\,/g'

will replace , - > (),

(2)sed 's/\,/\(\)\,\n/g'
will replace , - > (), < and a new line insert>

April 4, 2009 at 2:37 PM

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ►  2018 (3)
    • ►  April (3)
  • ►  2017 (3)
    • ►  August (3)
  • ►  2015 (1)
    • ►  January (1)
  • ►  2014 (2)
    • ►  December (1)
    • ►  November (1)
  • ►  2012 (3)
    • ►  July (2)
    • ►  February (1)
  • ►  2011 (3)
    • ►  August (1)
    • ►  January (2)
  • ►  2010 (1)
    • ►  August (1)
  • ▼  2009 (18)
    • ►  December (2)
    • ►  November (3)
    • ►  May (3)
    • ▼  April (1)
      • unix script replace comma with comma follwoed by N...
    • ►  March (3)
    • ►  February (6)
  • ►  2008 (54)
    • ►  October (15)
    • ►  September (30)
    • ►  August (2)
    • ►  July (6)
    • ►  February (1)

About Me

Mydream
View my complete profile