The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




Thread: sed query
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #6 (permalink)  
Old 12-08-2006
grinder182533 grinder182533 is offline
Registered User
  
 

Join Date: Nov 2006
Posts: 17
sed example

Hi Anbu23

input

Ref: 12345678^M
Value Date: 28-MAY-2006^M
Debit A/c: 54321235 - abcdef^M
Customer : 100210547 - abcdef^M
Debit Amount: 9999999999.00 USD^M
Description: wire to Wxxxxxx^M
^M
Exchange Rate: 1.00000^M
etc etc

should turn into

Ref: 12345678^M
Value Date: 28-MAY-2006^M
Debit A/c: 54321235 - abcdef^M
Customer : 100210547 - abcdef^M
Debit Amount: 9999999999.00^M
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx USD^M
Description: wire to Wxxxxxx^M
^M
Exchange Rate: 1.00000^M
etc etc

cutting & pasting has offset the display above,
but my earlier line 5 position 31 is accurate.
Please also note that there are lots of records in each file,
and all have to be reformatted.
Many thanks again
I do appreciate your support.