As I did some switching today (between the new lin_tape version by IBM and our own lin_tape version), I ended up writing those lines a dozen times. Here is (just for me, if you don’t care .. skip ahead) on how to generate a list of commands:
1 2 3 4 5 6 |
for i in $( seq -w 1 32 ); do token="${i/0/}" path_prefix="/dev/lt/IBMtape12245775" echo "DELETE PATH TSM1 VTL1_DR$i SRCTYPE=SERVER DESTTYPE=DRIVE LIBRARY=VTL1" echo "DEFINE PATH TSM1 VTL1_DR$i SRCTYPE=SERVER DESTTYPE=DRIVE LIBRARY=VTL1 DEVICE=$path_prefix$((token+11))A1" done |
which should get you a list like this:
1 2 3 4 |
... DELETE PATH TSM1 VTL1_DR21 SRCTYPE=SERVER DESTTYPE=DRIVE LIBRARY=VTL1 DEFINE PATH TSM1 VTL1_DR21 SRCTYPE=SERVER DESTTYPE=DRIVE LIBRARY=VTL1 DEVICE=/dev/lt/IBMtape1224577532A1 ... |