[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Need help with 'cut' alternative
From: |
Ralph Corderoy |
Subject: |
Re: Need help with 'cut' alternative |
Date: |
Tue, 16 Jul 2002 07:42:46 GMT |
Hi Reed,
> I'm using "cut" to get lines of a file into another file. But cut,
> much like a word processor's "copy", leaves a copy of that cut line in
> the original file. Is there a bash command that *moves* the cut line
> to the new file, without leaving that line in the original? A true
> "cut", and not a "copy."
You can't do it as a simple shell statement with I/O redirection since
you want to modify/create two files.
Have you tried making two passes?
cut -c 11-20 db >col2
cut -c 1-10,21- db >db.new
Cheers,
Ralph.