SUMMARY: Quick script question - second round

From: Jeff Kennedy <>
Date: Tue Oct 02 2001 - 10:34:58 EDT
Holy cow the answers came in fast, Roger just happened to be the first
but by the time I posted the summary I got 8 more.

Almost all suggested the same as Roger:

for X in `cat /path/to/input`
	bpimmedia -media $X

with one exception:

while read X
	bpimmedia -media $X

Thought this deserved mention as well.  Thanks to all for such quick


Jeff Kennedy wrote:
> I am trying to write some NBU reports and have run into a snag (easy to
> do since I'm not a real scripter anyway).
> I have a file containing all my media ID's and want to use that as input
> for another file.  I need to use the listing as a for loop so I am going
> on the assumption that something like this is needed:
> medialist=`cat /path/to/file`
> for X in $medialist
> do
>         bpimmedia -media $X >> /path/to/log/file
> done
> The medialist variable is where I'm having trouble.  This doesn't seem
> to work.  Do I need to use read somehow to make this work?  I would
> appreciate an example.
> Thanks.
Jeff Kennedy
Unix Administrator
Received on Tue Oct 2 15:34:58 2001

This archive was generated by hypermail 2.1.8 : Wed Mar 23 2016 - 16:32:32 EDT