Runtime input


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Runtime input
# 1  
Old 10-16-2013
Runtime input

Hi all..

I have a command for example /abc/def/ghi.jkl Filename filename1.

If I run this command, it will ask for y/N which I have to type manually.

Now Im trying to automate it using shell script and input the y option.

Please help me on doing this.

Thanks in advance.
Sathya V.
# 2  
Old 10-16-2013
Have you tried just using echo? e.g. echo y | yourscript.sh. Or yes.
# 3  
Old 10-16-2013
I have some other lines in the shell script. One of the line will be the command I have given below.
# 4  
Old 10-16-2013
Hi,
You can inspire you to this idea
Regards.
# 5  
Old 10-16-2013
Thanks a lot CarloM..That didnt work :-(

Your option will also not work in my case disedorgue.

Let me explain it again..

I have a script which will zip a xml file and encrypt the file using PGP encryption. While encrypting, it is asking me to type a y/N to proceed. In this case I have to input a y manually and enter to continue.

However I need a way to pass the y automatically and continue. Please help me with this.
# 6  
Old 10-16-2013
Hi,
If you use pgp command, you can configure certainly in config.txt of your environment.
Regards.
# 7  
Old 10-16-2013
Thanks a lot disedorgue,..Can you please elaborate on how to do that?

Like where the config file will be ?
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Read input files and merge them in given order and write them to input one param or one file

Dear Friends, I am looking for a shell script to merge input files into one file .. here is my idea: 1st paramter would be outfile file (all input files content) read all input files and merge them to input param 1 ex: if I pass 6 file names to the script then 1st file name as output file... (4 Replies)
Discussion started by: hyd1234
4 Replies

2. 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

3. Shell Programming and Scripting

using read to enter the input at runtime

Hi I am stucked in the below script .I want to input with yes/no from the user and then execute the code inside if but it is not working .I just need the logic as where I am wrong so that i can use the same in my work . then echo "Hi All" fi ]. Please suugest . (4 Replies)
Discussion started by: mani_isha
4 Replies

4. Solaris

Re:How to get the path during runtime?

Thank u vgesh99 It works well.. (1 Reply)
Discussion started by: Nandagopal
1 Replies

5. Solaris

How to get the path during runtime?

Hi guys, I have commands like /solaris/opt/VRTS/bin/vxdisk /opt/VRTS/bin/vxdisk From these two commands, i need to get the directory path value before /VRTS/bin/vxdisk at runtime. e.g /solaris/opt/VRTS/bin/vxdisk as /solaris/opt /opt/VRTS/bin/vxdisk as /opt I have tried with cut... (1 Reply)
Discussion started by: Nandagopal
1 Replies

6. Shell Programming and Scripting

Reading specific contents from 1 input files and appending it to another input file

Hi guys, I am new to AWK and unix scripting. Please see below my problem and let me know if anyone you can help. I have 2 input files (example given below) Input file 2 is a standard file (it will not change) and we have to get the name (second column after comma) from it and append it... (5 Replies)
Discussion started by: sksahu
5 Replies

7. UNIX for Dummies Questions & Answers

Runtime Error...

My system did stay appears the error Run Time Library Error. What itīs? When the error appear, iīve to reboot my system and lost all I did. Is there the UNIX System problem? Please. I need help!!! (4 Replies)
Discussion started by: marpin
4 Replies

8. Solaris

Runtime error...

My interprise use a UNIX mainform for a instrumentation process control. The control use the FOXBORO INVENSYS system and they donīt gonna solve the problem the run time error. The run time error happen without logic explication. When everything itīs run perfectely and happenly appears the run time... (1 Reply)
Discussion started by: marpin
1 Replies

9. Shell Programming and Scripting

Getting Function Name At Runtime

Hi, Suppose I have a User define function get_abc in which I am using $0 to get the name of function. But when I call that function in any script, $0 will give the script name, not the function name. For example: Function: get_abc ------------------- get_abc( ){ echo $0 } Script:... (3 Replies)
Discussion started by: yeheyaansari
3 Replies
Login or Register to Ask a Question