SUMMARY: ksh script question

From: David Komanek <xdavid_at_aragorn.natur.cuni.cz>
Date: Tue, 23 Feb 1999 18:33:05 +0100 (MET)

Here is an example how to do it : \t character in echo command gives the
TAB like an separator.

#!/bin/ksh
while read buffer
do
        echo "$buffer\t`echo "$buffer" \
          | tr -ds '\n' '' | tr '[:upper:]' '[:lower:]' `"
done < $1




David Komanek



> I have a file with the following (for example:)
>
> ABC123X
> DEF123Z
> GHI456A
>
> I need to get an output file with the following...
>
> ABC123X abc123x
> DEF123Z def123z
> GHI456a ghi456a
>
> Basically change the line to lower case but have both in the file.
> There would be about 100 lines in the file.
>
> Can anyone send me an example on how to do this?
>
> thanks,
> Allan
>
Received on Tue Feb 23 1999 - 17:32:39 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:39 NZDT