10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
#Just trying to check if letters are in the user input. Any tips?
# I have tried regexp and using 0-9 etc, i cannot get this to work either in just an if statement or while in a loop.
echo "Please pick a number"
if ; then
echo "Please enter a number"... (7 Replies)
Discussion started by: jvezinat
2. Shell Programming and Scripting
I am trying to allow a user to enter in text and then store that text in a variable $gene to run in an awk command in which those values are used to run some calculations. I am getting syntax errors however, when I try. Thank you :).
The awk runs great if it is a pre-defined file that is used,... (7 Replies)
Discussion started by: cmccabe
3. Shell Programming and Scripting
How to check the user input to be valid using shell script?
The valid input is in the format like as follows.
1. It can only have r,w,x or a hyphen and nothing else.
2. ensure the r, w, x are in the correct order.
for example: rwxr-xr-x is a valid format.
Thanks (5 Replies)
Discussion started by: hyeewang
4. Shell Programming and Scripting
On my Java webpage which invokes the shell script has two checkboxes viz ...
apache require one parameter i.e apache home from the user while Weblogic requires three or five params from the user vi.z weblogic_home or <jdk_home, config_home & pid>, username and... (4 Replies)
Discussion started by: mohtashims
5. Homework & Coursework Questions
Good Evening. I'm new to C. Can you please help me.
I'm creating an error checking function, user will input a string, this will check if the input is all alphabet or all letters only. If there is a digit or other special char, it will print Error then ask input from user again.
Here's my... (1 Reply)
Discussion started by: eracav
6. Shell Programming and Scripting
i have a script which takes input from user, if user gives either Y/y then it should continue, else it should quit by displaying user cancelled.
echo " Enter your choice to continue y/Y OR n/N to quit "
echo " user requested to continue "
##some commands... (7 Replies)
Discussion started by: only4satish
7. Shell Programming and Scripting
echo "Enter file name of input file list along with absolute path : "
for string in `cat inputFileList`
echo " file does not exist"
From the above code, if the user enters a invalid file... (1 Reply)
Discussion started by: i.srini89
8. UNIX for Dummies Questions & Answers
I am writing my own rm command in unix.
I prompt the user to type if he wants to delete a file and then read what he typed.
But how do i check what he typed?
This is my program so far:
echo 'Delete prog1.c (y/n)?'
if yesOrNo == 'y'
rm prog1.c... (6 Replies)
Discussion started by: mskart
9. Shell Programming and Scripting
Bash : how do i check the user input and make sure is only character or only number ? (7 Replies)
Discussion started by: CheeSen
10. Shell Programming and Scripting
I would like to know how the user can be restricted for entering only the number and not characters in sheel scripts..
Suppose code is like this
echo 'Enter the number'
Now user may enter 'a' as value...
But i want to disallow him for entering characters other than... (3 Replies)
Discussion started by: dhananjaysk