Quick script question

Jeff Kennedy jlkennedy at amcc.com
Tue Oct 2 10:08:14 EDT 2001


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
AMCC
jlkennedy at amcc.com



More information about the sunmanagers mailing list