06-18-2008
I don't know if it makes a difference but ./sh-n-body.i686 is a c file not a shell script.
Quote:
Originally Posted by lionatucla View Post
the above code just results in a . after the sh-n-body has finished. I still get the prompt
The ./sh-n-body.i686 script is expecting the input, not the script that you showed in the example.
Somewhere in the script, there is probably a 'read' statement. Looks like this perhaps:
Code:
read value
When you enter your input, it gets stored in $value.
Only thing you have to do is manually assign your input to $value, like so:
Code:
value="your input here"
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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. Shell Programming and Scripting
Problem:
I have a crontab and when it kicks off, xxx.sh shell script is called. Which has a nohup sqlplus session call. Problem is sql does not get executed and a text file is not getting created. Only a empty log file is getting created. Are there any constraints for crontab to open a sql... (6 Replies)
Discussion started by: radhika
6 Replies
3. Shell Programming and Scripting
Hi all,
I have a script that checks for the existence of files in a directory. Problem is,
if a file suddenly appears, I need to move it to another directory and then
call another program that does not import routines (within our DBMS).
Now, this script is ever running and uses the sleep... (3 Replies)
Discussion started by: gseyforth
3 Replies
4. Shell Programming and Scripting
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
5. UNIX for Dummies Questions & Answers
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
6. Shell Programming and Scripting
Hey guys,
I have some task from my office to lock user on the specified directory after the user logged on using ssh. And then run prompt program to fill the required information. Yeah, just like an ATM system.
My question:
How could I do those?? AFAIK I have to edit the ~./bashrc. But the... (1 Reply)
Discussion started by: franzramadhan
1 Replies
7. Shell Programming and Scripting
Hi,
My shell script not getting called through cron job.
The same works fine when executed manually.
I tried to generate logs to find if the scripts has some errors related to path using following command- trying to execute .sh file every 5 mins:
*/5 * * * * /home/myfolder/abc.sh... (17 Replies)
Discussion started by: Dejavu20
17 Replies
8. Homework & Coursework Questions
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
9. Shell Programming and Scripting
Hello,
I am in need of running an executable provided by a vendor that basically syncs files to a db. This tool can only be run against one folder at a time and it cannot have more than one instance running at a time. However, I need to run this tool against multiple folders. Each run of the... (5 Replies)
Discussion started by: vipertech
5 Replies
10. Shell Programming and Scripting
I have a shell script scheduled in cron job to run at every 1 minute which transfers files to remote machine and then move the files to backup folder.
cd /u01/app/ftp_tmp
sftp user@hostname <<-EOF
cd /home/user/ftp
mput *
bye
EOF
mv /u01/app/ftp_tmp/* /u01/app/ftp_bkp
Now the problem is... (6 Replies)
Discussion started by: Bhavi
6 Replies
LEARN ABOUT DEBIAN
ns_while
ns_lctl(3aolserver) AOLserver Built-In Commands ns_lctl(3aolserver)
__________________________________________________________________________________________________________________________________________________
NAME
ns_for, ns_foreach, ns_while, ns_lctl - Replacements for standard Tcl loop commands which enable monitoring and control
SYNOPSIS
ns_for start test next body
ns_foreach varname list body
ns_foreach varlist1 list1 ?varlist2 list2 ...? body
ns_while test body
ns_lctl cancel id
ns_lctl eval id script
ns_lctl info id
ns_lctl install command
ns_lctl list
ns_lctl pause id
ns_lctl result id
_________________________________________________________________
DESCRIPTION
The ns_for, ns_foreach, and ns_while commands are replacements for cooresponding Tcl commands with the additional capability of monitoring
and control through the ns_lctl command.
ns_for start test next body
See the for(n) man page for usage.
ns_foreach start test next body
See the foreach(n) man page for usage.
ns_foreach varlist1 list1 ?varlist2 list2 ...? body
See the foreach(n) man page for usage.
ns_while test body
See the while(n) man page for usage.
ns_lctl cancel id
Mark the given loop to cancel at the next iteration, resulting in the loop returning with TCL_ERROR.
ns_lctl eval id script
ns_lctl info id
ns_lctl install command
ns_lctl list
ns_lctl pause id
ns_lctl result id
SEE ALSO
for(n), foreach(n), while(n)
KEYWORDS
threads, iteration, list, looping, cancel
AOLserver 4.5 ns_lctl(3aolserver)