Computing.Net > Forums > Unix > Auto say y or n in a shell script

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Auto say y or n in a shell script

Reply to Message Icon

Name: Binh Le
Date: October 21, 2002 at 10:19:50 Pacific
OS: AIX
CPU/Ram: 256
Comment:

Hi all,
I'm writing a shell script to execute PGP, then FTP to several FTP site at the same time. Please let me know how to put in the script so that it'll automatic say y and don't promp me for it.
Thanks



Sponsored Link
Ads by Google

Response Number 1
Name: David Perry
Date: October 21, 2002 at 10:23:54 Pacific
Reply:

typing 'prompt' will disable the prompt during an interctive session.
Most ftp clients allow for the '-i' flag in a script to disable prompting. Check man ftp for your client.


0

Response Number 2
Name: Binh Le
Date: October 21, 2002 at 10:35:01 Pacific
Reply:

David,
Thanks for the reply. 'prompt' doesn't work. Please give me another suggestion.
Ex: rm -i test.txt (by the way, rm -i is a company standard alias... I'm not suppose to change it... grrrr...)


0

Response Number 3
Name: Binh Le
Date: October 21, 2002 at 12:19:29 Pacific
Reply:

I figure it out.
yes | rm test.txt


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: Auto say y or n in a shell script

Exit from sqlplus in a shell script www.computing.net/answers/unix/exit-from-sqlplus-in-a-shell-script/8244.html

Parameter file for a shell script www.computing.net/answers/unix/parameter-file-for-a-shell-script/6026.html

Timer in a shell script www.computing.net/answers/unix/timer-in-a-shell-script/4097.html