Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Noob. shell script with prompt? Post 302982016 by Corona688 on Thursday 22nd of September 2016 12:52:23 PM
Old 09-22-2016
If you're not in BASH, you don't get read -p.

Most shells should have read -r, you must be in a really old or minimal shell if you don't. Luckily -r isn't mandatory, it just prevents read from handling backslashes.

Also, be careful with spaces inside [ ] brackets. Each separate item must be separated by whitespace.

Code:
printf "Files will be overwritten, continue?"
read CONT
if [ "$CONT" = "y" ]; then
   mkdir /home/patient/backup-`gx125-svr`;
else
   exit;
fi

I don't know what gx125-svr is.
This User Gave Thanks to Corona688 For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

script to change shell and prompt

I want to write a shell script which will change the current shell (say from csh to bsh) and my Prompt (say my name) as desired.pls help (1 Reply)
Discussion started by: SHYAM
1 Replies

2. UNIX for Dummies Questions & Answers

sudo in OS X shell script without password prompt??

I've written a shell script to alter a particular preference file on OS X (10.3.9), which works fine (tested by running the script from the terminal sat in front of the box). Problem is, I now have to run this script remotely across a number of machines via remote desktop, so where I've used the... (1 Reply)
Discussion started by: Brad_GNET
1 Replies

3. Shell Programming and Scripting

Can give the input to prompt using shell script

Hi, I want to send input to promt from shell script, this thing is possible. I give the one command `/usr/share/ssl/misc/CA -newreq` it needs some user input like password etc., but i need this input also from shell script but it does not works. `/usr/share/ssl/misc/CA -newreq` <<EOF... (2 Replies)
Discussion started by: Vaibhav Agarwal
2 Replies

4. Shell Programming and Scripting

shell script executes program, but waits for a prompt

Sorry, newbie here. I have the following shell script which basically executes the sh-n-body.i686 program a specified number of times. However, before the sh-n-body.i686 begins its calculations it prompts for input from the user. In this case the user would have press ". return" and... (7 Replies)
Discussion started by: lionatucla
7 Replies

5. Shell Programming and Scripting

Shell Script to prompt customer for name etc

How do I create a shell script called 'custinfo' to prompt a customer to enter and display back the following: name, age, address, phone number, product, price range. Thanks (1 Reply)
Discussion started by: SQLScript
1 Replies

6. UNIX for Dummies Questions & Answers

Shell Script to prompt customer for name etc

reposting How do I create a shell script called 'custinfo' to prompt a customer to enter and display back the following: name, age, address, phone number, product, price range. Thanks (1 Reply)
Discussion started by: SQLScript
1 Replies

7. Homework & Coursework Questions

Unix Shell Script to prompt customer for name etc

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: How do I create a shell script called 'custinfo' to prompt a customer to enter and display back the following:... (4 Replies)
Discussion started by: SQLScript
4 Replies

8. Shell Programming and Scripting

unable to pass value to user prompt from calling shell script

This is my script structure main script calls configure script which needs to be run as a different user and the configure script calls my application installation script. the application instruction script prompts the user for a directory which I need to pass from my main or configure script. ... (4 Replies)
Discussion started by: cmastays
4 Replies

9. Homework & Coursework Questions

Shell Script Password Prompt

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: I am trying to write a shell script that prompts the user for the password which is "lux" once the correct password... (4 Replies)
Discussion started by: Emin_Em
4 Replies

10. Shell Programming and Scripting

Shell script prompt for first parameter ($1) then run

I have to run post configuration script like this script file is post_config.sh post_config.sh 1234 #1234 is node ID according to given node ID all script run .. .. But i want to post_config.sh script should ask for node ID then run like this.. post_config.sh #i want to run... (8 Replies)
Discussion started by: Ganesh Mankar
8 Replies
sane-xerox_mfp(5)					   SANE Scanner Access Now Easy 					 sane-xerox_mfp(5)

NAME
sane-xerox_mfp - SANE backend for Xerox Phaser 3200MFP device DESCRIPTION
The sane-xerox_mfp library implements a SANE (Scanner Access Now Easy) backend that provides access to the following Xerox USB multifunc- tion-peripheral: Phaser 3200MFP If you own a scanner other than the ones listed above that works with this backend, please let us know this by sending the scanner's exact model name and the USB vendor and device ids (e.g. from /proc/bus/usb/devices, sane-find-scanner or syslog) to us. Even if the scanner's name is only slightly different from the models mentioned above, please let us know. CONFIGURATION
None required. FILES
/usr/lib64/sane/libsane-xerox_mfp.a The static library implementing this backend. /usr/lib64/sane/libsane-xerox_mfp.so The shared library implementing this backend (present on systems that support dynamic loading). ENVIRONMENT
SANE_DEBUG_XEROX_MFP If the library was compiled with debug support enabled, this environment variable controls the debug level for this backend. Higher debug levels increase the verbosity of the output. Example: export SANE_DEBUG_XEROX_MFP=4 SEE ALSO
sane(7), sane-usb(5), AUTHOR
Alex Belkin <abc@telekom.ru> 15 Dec 2008 sane-xerox_mfp(5)
All times are GMT -4. The time now is 04:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy