This is my script.
#!/usr/bin/sh
isql -UXx -Pxxxxxx <<!
set nocount on
use xxxx
go
select count(*) from BSC where bsc='$1'
go
!
exit
i am executing this script as :
temp2.sh 0000
the output is 0. but when i execute the query manually then the output is 1 which is correct. problem here is the command line argument $1 is not passed to the query.
how could i achieve this? I have tried all these possiblities:
bsc='$1'- output is 0
bsc="$1"- output is 0
bsc=`$1`- Syntax error
bsc="'$1'"- output is 0
I am using solaris unix and DB is sybase.