On Solaris /bin/sh for some strange reason still points to an actual real Bourne Shell instead of a POSIX shell. Try to using a POSIX shell by putting
as the first line of your script (I believe it is pointing to a ksh), or use ksh93 that possibly is available on your system.
Quote:
Originally Posted by SkySmart
.. i have tried using different shells - bash, ksh, sh - same thing.
That is strange. The first two should understand $( ).
Last edited by Scrutinizer; 07-08-2010 at 02:32 AM..
In one of my previous threads, someone suggested not to use backticks. When I googled, I came to know that back ticks are deprecated instead $() should be used. But I face issue while using $().
Note: I used echo of the sql just to debug.
The following is the code
#!/bin/ksh
#set -x... (5 Replies)
Hello,
Ubuntu server 11.10
can anybody help what is problem with my shell script?
#!/bin/bash
#script to find out currently logged on user is root or not.
if ]
then
echo "You are super"
else
echo "You are awesome!"
fi
When I run script, I get following output
./uid: line 3:
I... (4 Replies)
Hi,
In my perl script I want to check whether *.csv files exist and take the count .
Below is the code:
$path = “/home/usr/jan/myfiles”
my $File_Count = `ls *.csv | wc -l `; # Checks in the current directory #Works fine if files exists.
my $File_Count = `ls $path/*.csv | wc -l `; # I need... (2 Replies)
Hey there,
I`m a beginner so don`t be brutall with me if it`s a stupid or easy question.
I need to make a script that
1) reads from a text file with this pattern:
2) and i need it to insert the #defines in the .c files
Problem is, that i`m working in a batch file,from within... (3 Replies)
hi,,
i have perl scipt with line :
system('./try.sh $t $d $m');
in shell scipt try.sh i have the line:
echo $1
its not printing value of $t that i hav passed..y is it so..i am running it from apache web server (2 Replies)
HOSTNAME=`uname -n`
/usr/sbin/clinfo
CLUSTERACTIVE=$?
# First check whether the Cluster itself is active
if
then
echo Cluster is NOT ACTIVE - EXITING
exit 1
fi
# Now check whether we are on the active Cluster Node for this Resource Group... (2 Replies)