From: Mark.Cuthbert () yorkshirewater ! co ! uk
To: tru64-unix-managers
Subject: Text manipulation -Howto
Date: Wed, 20 Oct 1999 10:56:12 +0000 [thread overview]
Message-ID: <96079079016205.tru64-unix-managers.marc@archive.invalid> (raw)
Hi guys,
I could do with some help with a script to manipulate a data-file so I can
substitute values "@" for "" (null).
The following is example output from dumping a database, where the dump
command does the opposite, ie where tha value is null in the database the
output has an @.
<snip>
2|10158086|34|21502169000342X|AU6|1|19950313|13/03/95,00001|C|1|94000000|@|
Y||@|@|19691231|0|@|
2|10158086|35|486191270001536|AU6|1|19950313|13/03/95,00001|C|1|94000001|@|
Y||@|@|19691231|0|@|
2|10158086|36|192070110001719|AU6|1|19950313|13/03/95,00001|C|1|94000002|@|
Y||@|@|19691231|0|@|
2|10158086|37|372011910003150|AU6|1|19950313|13/03/95,00001|C|1|94000003|@|
Y||@|@|19691231|0|@|
<snip>
1|10158086|80781|520449921000000|@|@|19950320|20/03/95,00237,SCAN &
DES|C|1|94080698|@|Y||@|@|19691231|0|@|
1|10158086|80782|206017190001215|Z|@|19950420|YORK,20/04/95,0003|C|1|940806
99|@|Y||@|@|19691231|0|@|
<snip>
I guess this should be simple using sed/awk/perl etc. but I have not done
much text manipulation under UNIX. One problem is that it may not be the
same field that has an @ in each record
Sorry for seeming dumb!
Regards
Mark Cuthbert
Yorkshire Water
UK
The information in this e-mail is confidential and may also be legally
privileged. The contents are intended for recipient only and are subject
to the legal notice available at http://www.keldagroup.com/email.htm
Kelda Group plc and its subsidiaries, UK
Registered in England and Wales No 2366627
reply other threads:[~1999-10-20 10:56 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox