Thanks
Johan, but i'm planning to use perl as a Plan B, if i totally screwed up with Shell. "I'll revert to you on this as well once testing".
Hey Vicky ,
Thanks for your response, i want to clear out these points:
1) What is $TempFile1 for, cause once i execute the script, i got this error
"./test3.sh: $TempFile1: ambiguous redirect".
2) Regarding the query, i want to do a loop on update, so teh loop will be shell script on DB update query, so shall i make while or for loop before the bracket, and then inculde the update query in-between !!!
Below is my code that is what i'v written:
#=======================================================
# Get the Connection String for isql
#=======================================================
SERVER=127.0.0.1
SYBASE_USERNAME=sa
DATABASE=mmsdb
SYBASE_PASSWORD=test
connection_str="-S $SERVER -U $SYBASE_USERNAME -D $DATABASE"
isql $connection_str <<EOF | egrep -v "Password:" > $TempFile1
$SYBASE_PASSWORD
{
#"Please write your Sybase query in between this middle bracket."
Insert into TEST values (3,"Test","TestDesc")
go
}
go
EOF