10 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
Hi All,
I have written one script, which is connecting 3 diffrent servers and executing script placed on those.
It is smthing like:
spawn ssh user@server1
expect "*? assword:"
send "pw \r"
expect "$"
send " sh ./filename1 \r"
expect "$"
expect eof
spawn ssh user@server2
expect "*?... (7 Replies)
Discussion started by: KDMishra
7 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. Shell Programming and Scripting
Please tell me how to write a perl script that asks the user to enter words and that passes them to a variable.
In bash, the "read" command would achieve such user interaction.
#!/bin/bash
read -p "Enter files: " vFiles
However, I am looking for perl version of something equivalent... (2 Replies)
Discussion started by: LessNux
2 Replies
6. Programming
Hello Everyone:
I have the following code
int main()
{
system("/usr/OtherUser/bin/runX");
return 0;
}
runX must be executed with privileges from another user, how could I do that? I know the password for such user.
Thanks in advance (8 Replies)
Discussion started by: edgarvm
8 Replies
7. Shell Programming and Scripting
Hi all, I currently have a script which uses read -p for user interaction. e.g.
read -p "New user? " user
Is it possible to have it so if the user enters nothing and just presses return it can resort to a specified value instead?
Thanks! :) (5 Replies)
Discussion started by: JayC89
5 Replies
8. Shell Programming and Scripting
Hello,
I need some assistance in trying to figure out the best way to automate user account password resets.
The environment is a mix of 2000 HP-ux, aix, linux, and sunos boxes.
The security specs are to reset pw's every 90 days.
Most boxes are only accessible from within a current ssh... (2 Replies)
Discussion started by: deviousdoses
2 Replies
9. Shell Programming and Scripting
how do we read input from a user
e.g i want to ask a user to enter 6 sets of numbers
how do i control information from the user?
i have this.......
#!/bin/bash
echo "Please enter six numbers"
read number
echo $number >> file1
but this stops after the first number..how can i... (2 Replies)
Discussion started by: vadharah
2 Replies
10. Shell Programming and Scripting
I am trying to create a shell (ksh) which has two "read" commands, one which reads a line from a file and another which is inside a loop that reads user input from a keyboard. However, the "read" command inside the loop uses the input from the file and it does not get the user input from keyboard.... (3 Replies)
Discussion started by: stevefox
3 Replies