LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-06-2015, 11:21 PM   #1
yogeshjadhav96
Member
 
Registered: Jul 2015
Location: Bangalore, India
Distribution: RHEL 7
Posts: 36

Rep: Reputation: Disabled
Shell Script


I have one utility called 'gpstop' on my server, When i run this utility it always prompts me for confirmation (i.e. Are you sure to stop (Yy|Nn)?

I want a shell script that automatically gives "Y" as input?


Thanks In Advance,
YogesH
 
Old 10-06-2015, 11:32 PM   #2
Sefyir
Member
 
Registered: Mar 2015
Distribution: Linux Mint
Posts: 634

Rep: Reputation: 316Reputation: 316Reputation: 316Reputation: 316
Use yes?

Code:
yes - output a string repeatedly until killed
yes Y
 
1 members found this post helpful.
Old 10-07-2015, 02:57 AM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Code:
echo y|gbstop
?
 
1 members found this post helpful.
Old 10-07-2015, 09:22 PM   #4
yogeshjadhav96
Member
 
Registered: Jul 2015
Location: Bangalore, India
Distribution: RHEL 7
Posts: 36

Original Poster
Rep: Reputation: Disabled
Thanks Sefyir And Chris
 
Old 10-07-2015, 09:27 PM   #5
yogeshjadhav96
Member
 
Registered: Jul 2015
Location: Bangalore, India
Distribution: RHEL 7
Posts: 36

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by chrism01 View Post
Code:
echo y|gbstop
?
This resolved my issue, Marking this thread as solved.

Thanks All
 
  


Reply

Tags
shell scripting



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell script for run an shell script on server using ssh bloodstreetboy Linux - Server 5 01-12-2013 03:23 AM
How to pass command line arguments from one shell script to another shell script VijayaRaghavanLakshman Linux - Newbie 5 01-20-2012 09:12 PM
Executing a Shell script with 654 permissions inside another shell script. changusee2k Linux - Newbie 2 06-07-2011 07:58 PM
shell script problem, want to use shell script auto update IP~! singying304 Programming 4 11-29-2005 05:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration