Script error on tape usage


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Script error on tape usage
# 1  
Old 08-08-2014
Script error on tape usage

getting ./query[10]: 0403-057 Syntax error at line 1 : `|' is not expected.

here is the top portion of the script below.
Code:
#!/bin/ksh
DATE=`date +%b-%d`
TIME=`date +%H%M`
TIMEA=`date +%H:%M`
STAT=stat.csv
USERID=user
PASSWD=user_password
COMD="dsmadmc -id=$USERID -password=$PASSWD -dataonly=yes -noconfirm"
DRIVE1=`$COMD "q mount" | grep <drive_name1> | grep -v grep | wc -l`


Last edited by Don Cragun; 08-08-2014 at 04:10 PM.. Reason: Please use code tags
# 2  
Old 08-08-2014
I have no problems with the code (once I remembered to remove the < > around the drive name).

The error happens on line 10, and only 9 lines are posted.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

tape tar error

Hi, I am trying to determine if a tape is full because on 2 different tapes, im receiving 2 different kind of errors: # uname SunOS # /bin/tar cvf /dev/rmt/0n /export/home a /export/home/jerry/wlserver_10.0.tar.gz 28528 tape blocks tar: write error: unexpected EOF # mt -f /dev/rmt/0n... (5 Replies)
Discussion started by: mosies
5 Replies

2. AIX

How to monitor the IBM AIX server for I/O usage,memory usage,CPU usage,network..?

How to monitor the IBM AIX server for I/O usage, memory usage, CPU usage, network usage, storage usage? (3 Replies)
Discussion started by: laknar
3 Replies

3. Shell Programming and Scripting

error in script path for tablespace usage

Hi , I am trying to run this script in crontab but I get errors. When I run it explicitly like ./monitor_tblsp from another location then it runs fine . I am messing somewhere with paths but I don't know where and how . Please help . Here is the error part ./monitor_tblsp: touch: not... (2 Replies)
Discussion started by: capri_drm
2 Replies

4. HP-UX

how can I find cpu usage memory usage swap usage and logical volume usage

how can I find cpu usage memory usage swap usage and I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times my final destination is monitor process logical volume usage above X % and number of Logical voluage above can I not to... (3 Replies)
Discussion started by: alert0919
3 Replies

5. SCO

Tape error.

Hi, I am new to unix. We use Travan tapes to backup. The tape drive on two of our machines was working fine till this morning till we used the cleaning tape. We put the cleaning tape on the first machine, it got struck so we have to pull it out. Since then when we do the tar command we are getting... (1 Reply)
Discussion started by: krk123
1 Replies

6. UNIX for Advanced & Expert Users

Tape Drive error

I have a hp d 350 running on 10.2,im having a problem with the dds2 tape drive whenever i tried backing up larger files...i have remove the tape driver and add it using sam again but still the tape drive is not working .....is there a solution to this problem? # tar cvf /dev/rmt/0m priso.ds a... (3 Replies)
Discussion started by: giriplug
3 Replies

7. UNIX for Dummies Questions & Answers

error reading from tape

Hi all, I am attempting to read tar images from a DLT tape, and have recieved an error, which i don't know: tar: blocksize = 8 tar: directory checksum error I have been able to read from other tapes, using the same command (tar -tvf /devicename) but this time i have an... (3 Replies)
Discussion started by: colesy
3 Replies

8. UNIX for Dummies Questions & Answers

tape backup error

Hello everyone, I like to start off by saying thank-you all. You guys have saved my butt alot of time. Well I have a problem in which I can't find in the search. I'm trying to do a tar backup to a DDS3 tape as root: tar -cvf /dev/rmt/0 /home/larry the error tar:... (8 Replies)
Discussion started by: larry
8 Replies

9. UNIX for Dummies Questions & Answers

SCSI Tape Error

When I am trying to read any tape I getthe following message on my screen: "stp: Error on SCSI tape=0 (ha=0 id=6 lun=0)" Does anybody know how to solve this problem and what the message means. I already have rebooted the server and cleaned the heads of the tape unit. HELP!!!! (1 Reply)
Discussion started by: Andre
1 Replies
Login or Register to Ask a Question