need to trim spaces from sqlplus output

  • From: Andrew Kerber <andrew.kerber@xxxxxxxxx>
  • To: ORACLE-L <oracle-l@xxxxxxxxxxxxx>
  • Date: Tue, 18 Jan 2011 10:50:54 -0600

Does anyone have a unix script to trim spaces prior to the column separators
in sqlplus output, ie, I have output like his:

LAST NAME |FIRST NAME  |BIRTHDAY
Kerber          |Andrew           |Aug01

That I want to look like this:

LAST NAME|FIRST NAME|BIRTHDAY
Kerber|Andrew|Aug01


I am sure this has been solved many times, but for some reason I dont have
one of these in my script collection.

-- 
Andrew W. Kerber

'If at first you dont succeed, dont take up skydiving.'

Other related posts: