Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: data transformation
On 2007-02-13, m.t wrote:
> I have log file with data like this:
>
> 20608694;20416953;20420430;20414156;20409061;20606877;20609113;20607051;20607052;20608204;
> 20418197;20408410;20606460;20606462;20607297;20607356;20415876;20426551;20419862;20421635;
>
> Is there a way (Windows or Unix) to transform it to single column ?
>
> 20608694;
...
> 20419862;
> 20421635;
sed -e 's/;/;\
/g' < FILENAME > NEWFILENAME
Or (POSIX shell):
file=$( tr -d '\012' < ~/txt )
set -f
IFS=\;
printf "%s;" $file
-- Chris F.A. Johnson, author | <http://cfaj.freeshell.org> Shell Scripting Recipes: | My code in this post, if any, A Problem-Solution Approach | is released under the 2005, Apress | GNU General Public LicenceReceived on Tue Feb 13 2007 - 16:44:27 CST