twice confirmation in the script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting twice confirmation in the script
# 1  
Old 07-22-2010
Data twice confirmation in the script

from one script invoke another script will need to do double confirmation like: 'y' and 'y'

exp:
Code:
echo 'y' | /a/b/c.sh

only input 1 'y' in the c.sh, but the c.sh required 2 'y' (twice confirmation)


is there anyway get resolve this issue?


please help

Last edited by Scott; 07-22-2010 at 01:58 PM.. Reason: Added code tags for readability
# 2  
Old 07-22-2010
Hi.

Assuming it's the only manual input your script needs from you:

Code:
printf "y\ny" | /a/b/c.sh

# 3  
Old 07-22-2010
Quote:
Originally Posted by scottn
Hi.

Assuming it's the only manual input your script needs from you:

Code:
printf "y\ny" | /a/b/c.sh


if the c.sh will be invoke first by first 'y' then only 2nd 'y', this will be work too?

---------- Post updated at 12:18 PM ---------- Previous update was at 12:18 PM ----------

thanks... i did a small test. and it worked...

thanks alot
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Forum Support Area for Unregistered Users & Account Problems

Don't receive confirmation mail.

Hi Folks, I just recently registered with the username _Kaede. Unfortunately, I didn't receive any confirmation mail also not when I changed to another address. Help is very appreciated. Thanks and kind regards :) (2 Replies)
Discussion started by: Unregistered
2 Replies

2. UNIX for Advanced & Expert Users

Popup needed while reboot - for confirmation

Hi all, I need something like a pop-up while clicking on shutdown button or reboot button in GUI and also while running the command reboot / shutdown / init it should ask some confirmation message.. Do you want to do so..and so. How can i make this possible ? . (4 Replies)
Discussion started by: linuxadmin
4 Replies

3. Shell Programming and Scripting

sh script for file received confirmation

I am new at scripting, (and this fourm- so hi guys!) and I was wondering is there something out there that I can use to do the following: I receive a file on an FTP server I would like a script to look at a specifc directory for a certain file and when it arrives it will send an email... (8 Replies)
Discussion started by: mamemlin
8 Replies

4. Shell Programming and Scripting

Confirmation while deleting a file

Hi All, While am deleting a file in unix by using the command rm it's deleting the file directly IT's have to ask the user while deleting like do you want to delete filename y or N ? Kindly help on this. Thanks Thelak (2 Replies)
Discussion started by: thelakbe
2 Replies

5. Solaris

Netbackup Solaris Client confirmation

Greetings, I have a bunch of Solaris servers that are running Netbackup as a client. I set them up and my backup admin has confirmed that they are being backed up. But what I want to be able to do is run a command from each Solaris client to see some proof from the client side that the files... (1 Reply)
Discussion started by: BrewDudeBob
1 Replies

6. Shell Programming and Scripting

Search and Replace with Confirmation

Hi, I have created a script which searches and replace the searched text from any file in directory. I want to add a functionality where before replacing the text, script shows the line with the searched text and ask for user confirmation before replacing the text. Can this be done using SED... (18 Replies)
Discussion started by: Abhinav Tyagi
18 Replies

7. Shell Programming and Scripting

Confirmation needed while running the sql's

Hi, I need confirmation whether the same functionality exists when running the sql's. For ex. let us consider there exists a sql file with name june.When running in sql mode does: @june.sql and start june.sql does the same functionality. Someone help me. Thanks Ashok. (1 Reply)
Discussion started by: Ashok_oct22
1 Replies

8. Web Development

Pop up Confirmation Box

Hi, I was writing a simple web application using Perl -CGI. When users try to do some operations, I wanted like a pop-up confirmation box. Is this possible with Perl-CGI? Thanks in advance. Regards, garric (6 Replies)
Discussion started by: garric
6 Replies

9. Forum Support Area for Unregistered Users & Account Problems

need email confirmation resent

we had a power outage shortly after i registered... so my mail server was down for a while... could i get the email confirmation for hackware --> resent please...? thanx... ...william.o.yates...email removed (3 Replies)
Discussion started by: hackware
3 Replies

10. UNIX for Dummies Questions & Answers

Mail delivery confirmation

If I am sending mail with this command: mail .......@whatever.com < filename, is it possible to get delivery confirmation? Thanks (3 Replies)
Discussion started by: CSGUY
3 Replies
Login or Register to Ask a Question