Home Man
Search
Today's Posts
Register

BSD, Linux, and UNIX shell scripting — Post awk, bash, csh, ksh, perl, php, python, sed, sh, shell scripts, and other shell scripting languages questions here.

Recording user input from interactive shell script

Tags
shell scripts

Login to Reply

 
Thread Tools Search this Thread
# 1  
Old 04-30-2018
Recording user input from interactive shell script

Hello, I want to start out by saying that I am fairly new to scripting and am looking for someone that can point me in the right direction.

Basically what I need is a way to run a interactive script that will prompt users with questions weather that be yes/no or a specific answer.. I want to be able to record the users input into a answer file so I can run the script unattended on another server.. I have searched and searched but I can't seem to find anything on the subject.. Is it possible? Can maybe some point me in the right direction.

Any help would be appreciated\

thanks

Steven
# 2  
Old 04-30-2018
Welcome to the forum.

Your request is somewhat ambiguous. Try to be more specific, with code and data samples (both in "code tags"). Do you
- want to log the interactive answers? What keeps you from echoing them to a log file?
- want to read answers from a previously created file? Did you consider "input redirection"?
# 3  
Old 04-30-2018
Quote:
Originally Posted by RudiC
Welcome to the forum.

Your request is somewhat ambiguous. Try to be more specific, with code and data samples (both in "code tags"). Do you
- want to log the interactive answers? What keeps you from echoing them to a log file?
- want to read answers from a previously created file? Did you consider "input redirection"?
Ok, sorry, so basically I want to write a shell script that will ask you what script you want to run and then it will run script and record the users answer in a answer file and then use pssh to push the script and answer file to a bunch of servers and run it with the answer file.. I don't have any code yet cause I can't seem to get past the first part of the new script.. So the reason I can't use echo is cause the idea is the script I am writing should be able to run any script and record the answers and push the script and answers to the remote server.. So I can't alter the other scripts. I can't figure out how to use one script to run another script and record the answers.
# 4  
Old 05-01-2018
you can use script, from man script:

script - make typescript of terminal session
Login to Reply

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Linux Console for Interactive Input Script alvinoo UNIX for Beginners Questions & Answers 4 05-05-2016 11:43 AM
How to set a non-login non-interactive shell for a user? me_me_me Homework & Coursework Questions 4 12-29-2014 05:28 PM
Shell script to accept user input on the fly Arun_Linux Shell Programming and Scripting 2 06-06-2013 10:44 AM
How to check the user input to be valid using shell script? hyeewang Shell Programming and Scripting 5 03-02-2013 09:28 AM
interactive scripts with user input that includes quotes donniemac Shell Programming and Scripting 1 10-17-2012 11:16 AM
User Input Shell Script sureshcisco Shell Programming and Scripting 3 07-29-2010 07:22 PM
SQL PLUS Command 'ACCEPT' is not waiting for user input with sh shell script little_wonder Shell Programming and Scripting 4 03-04-2010 02:07 AM
Help with Interactive / Non Interactive Shell script rits Homework & Coursework Questions 1 08-16-2009 04:39 PM
put an interactive script in background after taking input epsilonaurigae Shell Programming and Scripting 7 02-15-2008 09:18 PM
How to hide user inputted text for interactive unix shell script? patrickpang Shell Programming and Scripting 1 04-04-2006 08:42 PM


All times are GMT -4. The time now is 07:49 AM.

Unix & Linux Forums Content Copyright©1993-2018. All Rights Reserved.
UNIX.COM Login
Username:
Password:  
Show Password