Grep and mv
From: WCB (wbarwell_at_Mungggedd.mylinuxisp.com)
Date: 07/12/05
- Next message: Robert Bonomi: "Re: Grep and mv"
- Previous message: Chris F.A. Johnson: "Re: reorganizing a delimited file in bash"
- Next in thread: Robert Bonomi: "Re: Grep and mv"
- Reply: Robert Bonomi: "Re: Grep and mv"
- Reply: Chris F.A. Johnson: "Re: Grep and mv"
- Reply: William James: "Re: Grep and mv"
- Reply: giacomo boffi: "Re: Grep and mv"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 12 Jul 2005 14:31:39 -0500
I have a whole bunch of files.
Using csplit I have managed to cut up a bunch
of files into more useful smaller files, now named
xx01 - xxN.
Using grep -m 1 HEADER* XX01 > filename, I can get
a certain line, such as HEADER 6-15-04 which I can copy to filename.
I have been trying to use mv XX01 to use the filename
contents as a name to mv that file to, but I don't seem
to be able to find the way to do that.
I am trying to set up a batch program to grep -m 1 * . filename,
mv * contents of filename to rename all all these xx* files
to the extracted HEADER+date name.
Being no expert at Bash, I am stuck at getting mv to use
the contents of filename as the file's new name.
What do I need to know?
many thanks.
-- When I shake my killfile I can hear them buzzing.
- Next message: Robert Bonomi: "Re: Grep and mv"
- Previous message: Chris F.A. Johnson: "Re: reorganizing a delimited file in bash"
- Next in thread: Robert Bonomi: "Re: Grep and mv"
- Reply: Robert Bonomi: "Re: Grep and mv"
- Reply: Chris F.A. Johnson: "Re: Grep and mv"
- Reply: William James: "Re: Grep and mv"
- Reply: giacomo boffi: "Re: Grep and mv"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|