- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: unix script
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-09-2001 08:50 AM
тАО07-09-2001 08:50 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-09-2001 08:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-09-2001 08:57 AM
тАО07-09-2001 08:57 AM
Re: unix script
I don't suppose it could be as simple as
echo "yes" | command
If you have more than one line you could build a tempfile
echo "yes" > /tmp/yn
echo "no" >> /tmp/yn
echo "exit" >> /tmp/yn
command < /tmp/yn
rm /tmp/yn
Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-09-2001 09:06 AM
тАО07-09-2001 09:06 AM
Re: unix script
PGP usually allows the '--batch' option which suppresses all interacxtive input. This may fix you.
Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-09-2001 09:24 AM
тАО07-09-2001 09:24 AM
Re: unix script
/what/ever/dir/pgp << EOF
yes
EOF
...jcd...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-09-2001 10:19 AM
тАО07-09-2001 10:19 AM
Re: unix script
I tried all of them.
It's asking "do you want to use this public key?" and I need a "yes" response.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-09-2001 10:27 AM
тАО07-09-2001 10:27 AM
Re: unix script
All of these response should have worked.
Exactly how are you starting the program?
...jcd...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-09-2001 10:31 AM
тАО07-09-2001 10:31 AM
Re: unix script
try with:
/dir1/pgp << !
yes
yes
!
you may use multiple "yes", there is no harm...
Cheers...
Satish.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-09-2001 10:35 AM
тАО07-09-2001 10:35 AM
Re: unix script
The fundamental problem is that this input is not coming from stdin but another file descriptor. You could probably use lsof to determine the fdes and then within the shell do an exec 4
But a better way is to use the correct options for pgp. This site contains the documentation you need and in particular how to run pgp in an automated environment:
http://www.gnupg.org
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-09-2001 10:36 AM
тАО07-09-2001 10:36 AM
Re: unix script
In that script file is the following
pgp -e filename username
This geberates the question that I have to answer with a "yes".