Script needs input always


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Script needs input always
# 1  
Old 11-01-2013
Hammer & Screwdriver Script needs input always

Dear All,

I have a sever configured as a Netbackup Master server from where I manually expire tapes.
I use the following command to expire a tape:

Code:
sudo /usr/openv/netbackup/bin/admincmd/bpexpdate -m A00362 -d 0

Once I hit enter , it prompts me for a y or n:


Code:
 sudo /usr/openv/netbackup/bin/admincmd/bpexpdate -m A00362 -d 0
Media A00362 is due to expire at 11/03/2013 21:41:32
Are you sure that the data on this media is not critical to
your business, and you are sure you want to delete A00362 y/n (n)?

I want to create a script that expires a certain amount of tapes. This script will run automatically using a cronjob.
How can I evade the input of 'y' all the time ? unless i do not type in y , it dosent progress.
Help.
# 2  
Old 11-01-2013
Try adding -force.
# 3  
Old 11-04-2013
worked like a charm. Thankyou Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Passing input to script using another script

I need a script to pass the input to another script. eg: I need a script to provide input to the sample script becuase my input value are constant. $./sample.sh PLease provide the comment:<input> date:<date> select the option:<1/2> (2 Replies)
Discussion started by: bkiran2020
2 Replies

2. Shell Programming and Scripting

Input redirection script

Hi, #!/bin/bash while ; do rm -f /tmp/pipe mkfifo /tmp/pipe ./yuv4mpeg_to_v4l2 < /tmp/pipe & mplayer tom_and_jerry.mp4 -vf scale=480:360 -vo yuv4mpeg:file=/tmp/pipe sleep 65; done When I run this - after mplayer finishes playing video it says - Exiting... (End of... (2 Replies)
Discussion started by: ashokvpp
2 Replies

3. Shell Programming and Scripting

Script to delete files with an input for directories and an input for path/file

Hello, I'm trying to figure out how best to approach this script, and I have very little experience, so I could use all the help I can get. :wall: I regularly need to delete files from many directories. A file with the same name may exist any number of times in different subdirectories.... (3 Replies)
Discussion started by: *ShadowCat*
3 Replies

4. Shell Programming and Scripting

Giving Input in a script

Hi, I am a newbie to scripting. I want to know something..Is there any way that I can do this? Here is the thing.. there are so many printer queues in which i need to change a certain option.. am using the hppi utility and i need to modify the printer configuration individually going to each... (3 Replies)
Discussion started by: aksijain
3 Replies

5. Shell Programming and Scripting

Manual input using script

hello, I have one script A that requires to to press "q" manually to quit the script. I am calling script A in another script B. Is there any way by which this "giving q manually" can be done inside script. and it does not require to gve it manually when using script B. Thanks. (8 Replies)
Discussion started by: skhichi
8 Replies

6. Shell Programming and Scripting

script that will take input via a vi session

Hi there. I am trying to write a script that will be used to record actions. eg # ./worklog -a "Peformed a memory upgrade on this box after we experiened a DIMM failure" at which point the script will log to file called /var/worklog prepending the comment with the users name... (2 Replies)
Discussion started by: rethink
2 Replies

7. Shell Programming and Scripting

Need script to take input from file, match on it in file 2 and input data

All, I am trying to figure out a script to run in windows that will allow me to match on First column in file1 to 8th Column in File2 then Insert file1 column2 to file2 column4 then create a new file. File1: 12345 Sam 12346 Bob 12347 Bill File2:... (1 Reply)
Discussion started by: darkoth
1 Replies

8. Shell Programming and Scripting

shell script with input

Hi all, Here is my shell script #!/bin/sh echo "What is your name" read name echo "What is your surname" read surname echo "Your name is:${name} and your surname is:${surname}" How can I modify this script so that I input those two variables from console?Lets say my name is "first"... (3 Replies)
Discussion started by: c0mrade
3 Replies

9. Shell Programming and Scripting

Giving input to a script through a script

/home/adw/a.ksh << EOF a b EOF This is how we give input to a file through script Our client has done the coding in a different way :- /home/adw/a.ksh << ** a b Can nybody pls tell me the significance of ** (7 Replies)
Discussion started by: radhika03
7 Replies

10. Shell Programming and Scripting

file as input for script

how do I use a file (comma seperated) as an input for a script in bin/sh? e.g. I have a script that : Input1=$1 Input2=$2 Input3=$3 Input4=$4 echo "$Input1, $Input2, $Input3,$Input4" (or some other function) If I have a .csv file which lists many rows of input: joe,5,john,10... (1 Reply)
Discussion started by: finster
1 Replies
Login or Register to Ask a Question