06-29-2012
sh without any arguments will read commands from stdin. If you have not redirected stdin, it's waiting for your input at the terminal. Typing control-d will send EOF (end of file) and sh will exit, resuming the script.
Aside from possibly executing some startup files, sh < /dev/null should not do anything at all; when it attempts to read a command from stdin, it immediately sees EOF. Seems rather pointless.
Regards,
Alister
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I am getting an error while executing the mail command....
It says saved letter in dead.letter even though the email id id correct .
Please do help..
Madhu (2 Replies)
Discussion started by: madhumathikv
2 Replies
2. Shell Programming and Scripting
Hi Gurus,
I've a find command that gets the list of files from a source directory where the extension is not html, xml, jsp, shtml or htaccess. The below find command runs fine from the command prompt or in a shell script. I need to eventually run it in a PERL script and am getting the... (5 Replies)
Discussion started by: voorkey
5 Replies
3. Shell Programming and Scripting
Hi,
I am executing below script
s1=`pwd`
s2=/space
if
then
echo "done"
else
echo "mistake"
cd /tmp
fi
I am not able to migrate to /tmp directory if the condition is not true.However mistake is being printed.Means cd command is not working here.All other commands except cd are... (3 Replies)
Discussion started by: d8011
3 Replies
4. AIX
Hi Folks
I get the below error in my aix box. Im not sure if this is an AIX issue or a TWS issue. Please advice me
cbspsdb01:/opt/TWS/bin # ./conman status
exec(): 0509-036 Cannot load program ./conman because of the following errors:
0509-150 Dependent module... (6 Replies)
Discussion started by: newtoaixos
6 Replies
5. Shell Programming and Scripting
Hi,
I have situation where i need to automate transferring 10000+ files using sftp.
while read line
do
if ; then
echo "-mput /home/student/Desktop/folder/$line/* /cygdrive/e/folder/$line/">>sftpCommand.txt
fi
done< files.txt
sftp -b sftpCommand.txt stu@192.168.2.1
The above... (1 Reply)
Discussion started by: noobrobot
1 Replies
6. Red Hat
Hi,
I am using RHEL4 and Oracle11g , my application requires odbc connection
hence I modified ODBC.ini file and when I exceute isql commande I got the following error.
isql: error while loading shared libraries: /opt/nastel/apwmq/odbc/lib/libodbc.so.1: requires glibc 2.5 or later dynamic... (1 Reply)
Discussion started by: roopalidalvi231
1 Replies
7. Red Hat
Hi,
I am using RHEL4 and Oracle11g , my application requires odbc connection
hence I modified ODBC.ini file and when I exceute isql commande I got the following error.
isql: error while loading shared libraries: /opt/nastel/apwmq/odbc/lib/libodbc.so.1: requires glibc 2.5 or later dynamic... (4 Replies)
Discussion started by: roopalidalvi231
4 Replies
8. UNIX for Advanced & Expert Users
Hi All,
I am trying to execute a set of sql statements in sql server 2008 using the sqlcmd command in unix and passing the query in the "input" parameter. It is giving me an error "incorrect syntax near 2014". The below statement is giving an error :
declare date_val datetime,
... (4 Replies)
Discussion started by: Rahul Raj
4 Replies
9. Web Development
hi,
i have curl command to POST a soap request to web service. I have a file (query.xml) which has all the soap message attached to it I just don't seem to be able to properly post it.
curl command
curl -s -H "Content-Type: text/soap+xml;charset=UTF-8" -H "SOAPAction:" -d @query.xml... (2 Replies)
Discussion started by: siramitsharma
2 Replies
10. Red Hat
I'm running CentOS 6.8 and use bash. I would like a warning to appear to the user who runs the command "service httpd restart"
E.g.
# service httpd restart
are you sure y/n
n
#
(or if y, the command executes).
I looked into it a little but am not sure of the best approach. Aliases I... (2 Replies)
Discussion started by: spacegoose
2 Replies