![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Shell Script Assistance | jaysunn | Shell Programming and Scripting | 2 | 05-08-2009 05:36 PM |
| shell script assistance please | xinoo | Shell Programming and Scripting | 5 | 08-05-2008 12:18 PM |
| need assistance ----SH schell script | shahidbakshi | Shell Programming and Scripting | 2 | 02-22-2008 06:28 AM |
| Need a little assistance with a shell script | rickou812 | Shell Programming and Scripting | 3 | 02-04-2008 04:18 AM |
| KSH Script Assistance | Brusimm | Shell Programming and Scripting | 3 | 05-10-2007 09:15 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
|||||
|
I'm surprised that code works at present, you've got three end ifs (fi), two elses, but only one if statement. All a bit weird. Is this the full script or just an excerpt? If you just want to issue some command against each bunch of 15 tapes seperated by : characters, try this: Code:
TAPE="/usr/openv/netbackup/bin/lto-fullt.mail" # Taken from your script above
tapes=0
for $thistape in `awk '{ print $1 }' < $TAPE` # Again from your script above
do
if [ $tapes -eq 0 ]
then
tapelist=$thistape
else
tapelist="${tapelist}:${thistape}"
fi
if [ $tapes -ge 15 ]
then
your eject command on $tapelist
tapes=0
fi
done
Not tested of course. |
|
|||||
|
Quote:
i have not test it out. i've been working on the other part to get the ":" added to my full_tapes file. i was also going to ask, would using sort or asort work to separate the tapes into groups of 15? ---------- Post updated at 09:37 PM ---------- Previous update was at 09:32 PM ---------- thanks smiling dragon. i'll give that a try. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|