9 More Discussions You Might Find Interesting
1. 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
7 Replies
2. Shell Programming and Scripting
I have a file full of coordinates of the form:
37.68899917602539 58.07500076293945 57.79100036621094
The numbers don't always have the same number of decimal points. I need to reduce the decimal points of all the numbers (there are 128 rows of 3 numbers) to 2.
I have tried to do this... (2 Replies)
Discussion started by: crunchgargoyle
2 Replies
3. 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.
#!/bin/sh
echo " Enter your choice to continue y/Y OR n/N to quit "
read A
if
then
echo " user requested to continue "
##some commands... (7 Replies)
Discussion started by: only4satish
7 Replies
4. Shell Programming and Scripting
Hi,
echo "Enter file name of input file list along with absolute path : "
read inputFileList
if
then
for string in `cat inputFileList`
do
echo $string
done
else
echo " file does not exist"
fi
From the above code, if the user enters a invalid file... (1 Reply)
Discussion started by: i.srini89
1 Replies
5. UNIX for Dummies Questions & Answers
I have the following input:
xxxx-2.7.19_WR3
I have extract the following:
2.7.19
Can anyone suggest an awk or sed command to do the above...:confused:
another condition is
if the input is :
xxx-xxx_xxx-1.4-1_WR3.0bg.armv6jel_vfp
it shud still extract : 1.4-1
whenever "-"... (12 Replies)
Discussion started by: xerox
12 Replies
6. Shell Programming and Scripting
Hi,
My script ask for the input of two numbers in the middle of it.
I would like to know how to indicate this two numbers when I submit the script.
thanks for any help,
jalves (4 Replies)
Discussion started by: jalves
4 Replies
7. Shell Programming and Scripting
I have a file with the information shown and I want to capture the
entry having the rgdt tag and taking the value (the location of the represents the decimal point, for example 0p50 represents 0.50)
I then want to divide the number at the end of each line by the value 0.50
I want to do... (7 Replies)
Discussion started by: kristinu
7 Replies
8. UNIX for Dummies Questions & Answers
Hello,
I have a command that I need to supply a negative number as a parameter; how do I do this? I have tried giving it with double quotes, "", but no avail.
Thanks,
Gussi (3 Replies)
Discussion started by: Gussifinknottle
3 Replies
9. Shell Programming and Scripting
I have a situation where I want the user to enter only numbers in response to a READ command. I have some validation to restrict the number to be between 1 and 12, but if the user type in some characters the script echoes some error message and goes to the next command. Below is a snippet of the... (1 Reply)
Discussion started by: pvar
1 Replies