Re: Use a list of files
From: Dale DeRemer (dderemer_nospam_at_agmc.org)
Date: 02/27/04
- Next message: Stephane CHAZELAS: "Re: safely iterating through potentially empty arrays in bash"
- Previous message: Kevin Rodgers: "Re: negating search"
- In reply to: Heiner Steven: "Re: Use a list of files"
- Next in thread: John Doherty: "Re: Use a list of files"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 27 Feb 2004 14:54:13 -0500
Thanks for the replies, it works, and I've already used it in about 3
places.
"Heiner Steven" <heiner.steven@nexgo.de> wrote in message
news:403e6668$0$17576$9b4e6d93@newsread4.arcor-online.net...
> Dale DeRemer wrote:
> > I have a file, (list.txt) that contains a list of files that I need to
> > reformat. The file structure is like this:
> >
> > D101
> > D723
> > D445
> >
> > The number of files in the list will vary. The file changes with each
> > upload.
> > I have a fix script, fix.ksh that will manipulate the files for upload
to a
> > database, (remove useless lines and characters).
> > If I hardcode a file name in to the fix script, or use a command line
> > argument, it works. I need to automate this. What I'd like to do is have
> > fix.ksh read list.txt and operate on each file, one at a time. Any
> > suggestions?
> [...]
>
> while read filename
> do
> fix.ksh "$filename"
> done < list.txt
>
> Heiner
> --
> ___ _
> / __| |_ _____ _____ _ _ Heiner STEVEN <heiner.steven@nexgo.de>
> \__ \ _/ -_) V / -_) ' \ Shell Script Programmers: visit
> |___/\__\___|\_/\___|_||_| http://www.shelldorado.com/
- Next message: Stephane CHAZELAS: "Re: safely iterating through potentially empty arrays in bash"
- Previous message: Kevin Rodgers: "Re: negating search"
- In reply to: Heiner Steven: "Re: Use a list of files"
- Next in thread: John Doherty: "Re: Use a list of files"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|