How to execut commande line in application in linux ?

Hi,

I have one script my_script.sh with this content :

mssql-cli -S my_server -U my_user -d my_database -P ‘my_password’

This script works in linux but how execut this command “\e script.sql” in commande who is in my_script.sh ?

I have try :

mssql-cli -S my_server -U my_user -d my_database -P ‘my_password’ < \e script.sql

But i have message error :

root@my_server:~/project# Traceback (most recent call last):
File “/mssql-cli/lib/python3.6/runpy.py”, line 193, in _run_module_as_main
main”, mod_spec)
File “/mssql-cli/lib/python3.6/runpy.py”, line 85, in _run_code
exec(code, run_globals)
File “/mssql-cli/lib/python3.6/site-packages/mssqlcli/main.py”, line 101, in
main()
File “/mssql-cli/lib/python3.6/site-packages/mssqlcli/main.py”, line 94, in main
run_cli_with(mssqlcli_options)
File “/mssql-cli/lib/python3.6/site-packages/mssqlcli/main.py”, line 56, in run_cli_with
mssqlcli.run()
File “/mssql-cli/lib/python3.6/site-packages/mssqlcli/mssql_cli.py”, line 367, in run
self.cli = self._build_cli(history)
File “/mssql-cli/lib/python3.6/site-packages/mssqlcli/mssql_cli.py”, line 471, in _build_cli
eventloop=self.eventloop)
File “/mssql-cli/lib/python3.6/site-packages/prompt_toolkit/interface.py”, line 81, in init
self.input = input or StdinInput(sys.stdin)
File “/mssql-cli/lib/python3.6/site-packages/prompt_toolkit/input.py”, line 67, in init
assert self.stdin.isatty()
AssertionError

I have the same message when i try tro execut script in Ansible. Why ?

Thank you for your help community Ansible !! :wink:

Regards,