/usr/bin/ksh (Korn shell) is typically not available on BSD Unix and Linux, unless it is installed as an extra package.
Even hostname might not exist an some SysV Unix.
But all Unix have /bin/sh and should have uname -n
If your script has got ksh extensions so does not run with /bin/sh, try the following shebang:
or
Last edited by MadeInGermany; 02-21-2013 at 04:15 PM..
Reason: code tags
Yes, I really liked the idea of
But #! /usr/bin/ksh or other shebang is not the issue in here, because all the remaining 200 lines script works fine except below.
Which clearly says that it is not an issue concerned with shebang.
Please suggest me further. I believe is concerned with shell. If may be, how to fix this bug with respect any server?
I have a small script that works well but when I am putting pipes at the end of the echo command, output is getting weird.
My script it below:
sed '1d' CONTROL_TOTALS_*.txt | while read eachline
do
tblnm=`echo $eachline | cut -d'_' -f3`
if
then stg_tblnm='PROVIDER_CONTRACT'
elif
then... (6 Replies)
I am in the process of developing a perl cgi page.
I had succeeded in developing the page but there are few errors/issues with the page.
description about cgi page:
My CGI page retrieves all the file names from an directory and displays the files in drop down menu for downloading the... (5 Replies)
# echo 'export HISTFILE=/var/log/history/history_$(uname -n)_$(date +%Y:%b:%d:%H:%M)_$(who am i | awk '{print \$1}')' >> new_file
#
# cat new_file
export HISTFILE=/var/log/history/history_$(uname -n)_$(date +%Y:%b:%d:%H:%M)_$(who am i | awk {print $1})
#
Now how to echo the quotes around the... (2 Replies)
echo `echo ` doesn't echoes anything. And it's logic. But
echo `echo `echo ` ` does echoes "echo". What's the logic of it? the `echo `echo ` inside of the whole (first) echo, echoes nothing, so the first echo have to echo nothing but echoes "echo"
(too much echoing :P):o (2 Replies)
When i use the command to check the preview of the filesets to be installed using CLI
# When using this commad 'm able to see all Preview view of the filesets to be installed
installp -apgX -d "." all
# When I redirected the same output to a file 'm able to see only half the details... (1 Reply)
Hello,
I got a Qstion. Im posting to a phpbb forum with bash and curl.. i have a text file with the following tags that i post to the forum:
$var1
$var2
$var3
How can i with sed or awk put var content from shell script between the ... in the... (7 Replies)
Bit of a weird one i suppose, i want to use an echo inside an echo... For example...
i have a script that i want to use to take users input and create another script. Inside this script it creates it also needs to use echos...
echo "echo "hello"" >$file
echo "echo "goodbye"" >$file
... (3 Replies)
So in my shell i execute:
{ while true; do echo string; sleep 1; done } | read line This waits one second and returns.
But
{ while true; do /bin/echo string; sleep 1; done } | read line continues to run, and doesn't stop until i kill it explicitly.
I have tried this in bash as well as zsh,... (2 Replies)