LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-30-2014, 11:15 AM   #1
PH_Linux
LQ Newbie
 
Registered: Oct 2014
Posts: 1

Rep: Reputation: Disabled
Scheduled Interactive shell script possible?


Is it possible to provide user input (via terminal input) for a shell script that has been scheduled?
A script that looks something like below scheduled via "at" or a cronjob:

#!/bin/bash
echo "Enter something"
read str
echo "String is $str"
 
Old 10-30-2014, 03:05 PM   #2
wpeckham
Senior Member
 
Registered: Apr 2010
Location: USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 1,648

Rep: Reputation: 568Reputation: 568Reputation: 568Reputation: 568Reputation: 568Reputation: 568
Possible

Research the program 'expect' and consider allocation a virtual terminal for the run.
Better to re-engineer the applciation so it has an 'unattended' mode, but such automation IS possible.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
setting a timeout in an interactive bash shell script steven.c.banks Linux - General 2 01-23-2009 05:07 PM
Setting Up an Interactive Section within a Shell Script kaplan71 Linux - Software 2 09-02-2008 01:29 PM
shell script in non interactive way googlix Linux - General 6 11-13-2007 10:18 AM
writing a shell script for scheduled pinging laucian Linux - Newbie 12 11-08-2007 06:48 AM
shell script read non-interactive comtmr Linux - General 6 11-01-2006 07:54 AM


All times are GMT -5. The time now is 06:12 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration