LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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, 10: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, 02:05 PM   #2
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,512

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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:25 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