I am writting a script in csh and I am blanking out on how I code in the ability to process user input in the middle of a while/end loop.
while(1)
args..
end
it is a simple script, and I want to add hotkey functions, like q to quit, z to zero counters, etc..
Google has not been very... (1 Reply)
Hi folks,
I'm trying to organize functions in my ksh program into libraries.
If I run my program as any ksh user it will succeed.
Only when I run my program as tcsh user (i.e oracle) I failed.
Example
=======
The ksh code:
tornado:/tmp # cat nir.ksh
#! /bin/ksh
cdromPath=`pwd`... (1 Reply)
Here is my script:
echo "var 1:"
read varone
echo "$varone"
When I run in via ksh the script runs successfully.
However when I run it via tcsh I get "varone: Undefine variable"
Does the name command not work with tcsh or do I need some additional modification? Is there a way to get... (1 Reply)
I'm more familiar with bash/ksh that csh/tcsh. With that said, I recently ran across a problem with tcsh.
Our system admin recently installed purify on our solaris 8 system. In order to use purify you have to execute a Rational script in order to setup the paths and some environment variables... (3 Replies)
I'm writing a KSH shell script that's using SQL though DB2.
If I have a table defined and populated
db2 "create table tb(num int,letter char(4))"
db2 "insert into tb values(111,a)
db2 "insert into tb values(112,b)
db2 "insert into tb values(111,c)
How can I check if a letter user... (0 Replies)
Hello,
I am writing a script that requires the user to enter a string of numbers:
ex: 134 345 865 903
This command only allows for one variable to be entered:
set "var" = $<
and than once I got the array I want to change it to a list with each input on a different line:
... (1 Reply)
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)
I would like to check user input for arguments 1 and 2 for my Solaris TCSH script for the following:
1. That both user input arguments are numbers.
2. That they are both at least 5 digits.
Thanks for the help. (1 Reply)
My question is basically as the title says. How can I check a user inputted string is only certain characters long (for example, 3 characters long) and how do I check a user inputted string only contains certain characters (for example, it should only contain the characters 'u', 'a', 'g', and 'c')... (4 Replies)