[Veritas-bu] Altering script, failing somehow. What have I do ne wrong?
2003-07-02 11:39:14
Well, first off, your usage statement doesn't match your parameter order.
echo "USAGE: $0 schedule_file date(mm/dd/yy) time(hh:mm:ss)"
then
DATE=$1
TIME=$2
FILE=$3
File is $1, date is $2, & time is $3.
then, do this:
for CLASS in `cat $FILE`;do
...and it should work. Note, the single, back-quotes around the "cat $FILE"
and the included "$" sign.
-M
-----Original Message-----
From: James Wood [mailto:jwood AT apa.qwest DOT net]
Sent: Tuesday, July 01, 2003 8:42 PM
To: Veritas
Subject: [Veritas-bu] Altering script, failing somehow. What have I done
wrong?
The script fails when it is supposed to feed the contents of the input $FILE
to bpimagelist. Man, I'm learning but it's an uphill battle. ;-)
(Taken from eject_input.scr from backupscripts.com, full attribution to be
included in final)
-----------
#!/bin/sh
usage ()
{
echo "USAGE: $0 schedule_file date(mm/dd/yy) time(hh:mm:ss)" 1>&2
}
if [ $# -ne 3 ]; then
usage
exit 1
fi
DATE=$1
TIME=$2
FILE=$3
TP_INPUT=./tpeject_input
for CLASS in 'grep FILE';do
bpimagelist -media -L -d $DATE $TIME -sl $CLASS | grep "^Media" | awk
'{print $3}' > $TP_INPUT
done
_______________________________________________
Veritas-bu maillist - Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Veritas-bu] Altering script, failing somehow. What have I do ne wrong?,
Donaldson, Mark <=
|
|
|