I am using the following script. I am basically trying to enter data to my database using a storeprocedure.
PFB MY script.
#!/bin/csh -f
foreach FF (`cat ADDUSERS`)
isql -VENKIDB -U gloss -P glosss << _endl
set nocount on
go
use VENKI_PROD
go
print "Adding the user to GSTB Institutional for User : $FF"
go
sp_addlogin '$FF', '1$FF'
go
_end1
end
The script basically takes values from another file which is passing the values one by one as a parameter.
However when I try execute the above script it fails at second line with the below error.
_endl: << terminator not found
I tried various options and could get it corrected. Can someone help in finding out , what exactly I am missing.
Is this not compatible with cshell? If not it would be great if you let me know on what exactly is the reason.
---------- Post updated at 01:25 PM ---------- Previous update was at 01:17 PM ----------
I actually have another script which has the same snipped for connecting. It also connects through csh shell only. Also I dont get any error for the same.
however when I have just copied the connection line from the other script , I get this error when trying to execute the same in the new one. I am not sure on the type of the error.
let me know if you need the other script for your reference.