[SunHELP] multiple mounts using ksh script
Sandwich Maker
adh at an.bradford.ma.us
Thu Aug 14 09:52:45 CDT 2003
"From: zaheerahmed at earthlink.net
"
"Dear Sunhelp,
"I am trying to mount multiple remote file system using ksh script and getting error.
"# for in i `cat mount_list`
"> do
"> mount $i
"> done
"# mount: mount point cannot be determined
"
"where mount_list got the following lines
"remotemachine:/source_Dir_1 /Mount_Dir_1
"remotemachine:/source_Dir_2 /Mount_Dir_2
[btw, this is a uuoc]
you want something like:
while read VOLUME MOUNTPOINT JUNK
do
mount $VOLUME MOUNTPOINT
done < mount_list
i always stick a junk variable onto the ends of my reads, in case the
input lines contain unexpected junk fields. that's because the last
variable will contain the entire remainder of the line.
if you were really sure the mount_list lines were 'clean', you could
just read MOUNT and mount $MOUNT.
________________________________________________________________________
Andrew Hay the genius nature
internet rambler is to see what all have seen
adh at an.bradford.ma.us and think what none thought
More information about the SunHELP
mailing list