I made a script to connect to my sql server. when I copy my script into my terminal it works fine.
I connect to my sql server with a raspberrypi using Tsql
but when I put my script into a file to run it automatic I get an error.
First my script:
tsql -H Server -U Username -P Password
Go
Use master
paste it into my shell
root@raspberrypi:~# tsql -H Server -U Username -P Password
Missing argument -p, looking for default instance ... found default instance, port 1433
locale is "nl_NL"
locale charset is "ISO-8859-1"
using default charset "ISO-8859-1"
1> GO
1> use master
2> go
1>
I put exactly the same script into the file data.sh But it won't work.
root@raspberrypi:~# ./data.sh
Missing argument -p, looking for default instance ... found default instance, port 1433
locale is "nl_NL"
locale charset is "ISO-8859-1"
using default charset "ISO-8859-1"
1>
Can anyone help me with this problem
thanks