Hi,

On Wed, Oct 15, 2008 at 10:48, Jerry Geis <[EMAIL PROTECTED]> wrote:
> I am trying to create a script that takes an entire file,
> drops the first 19 characters from each line and creates a new file.
>       newline=`echo $LINE | cut -f 19-`

What you want is "cut -c 19-" (-c as in characters) and not "cut -f
19-" (-f as in fields).

>       echo $newline >> output.txt

This will also remove the spacing. You should at least use echo
"$newline" >>output.txt, but in any case it's silly as you can just:

cut -c 19- <test.txt >output.txt

HTH,
Filipe
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Reply via email to