What is the proper way to call a bash shell script in TM1 on linux. We can get it to work on windows with the following
ExecuteCommand ( 'PowerShell /data/disk1/xxx/ftp.sh',1);
When I try to run the shell using something like this nothing happens :
ExecuteCommand ( 'bash /data/disk1/xxx/ftp.sh',1);
Also tried
ExecuteCommand ( '/data/disk1/xxx/ftp.sh',1);
What I am doing wrong?
TM1 Linux shell
-
- MVP
- Posts: 351
- Joined: Wed May 14, 2008 1:37 pm
- OLAP Product: TM1
- Version: 2.5 to PA
- Excel Version: Lots
- Location: Sydney
- Contact:
Re: TM1 Linux shell
Both of your examples should be fine.
Check that ftp.sh is in a unix format (see dos2unix) then also check that the user that your TM1 instance is running as has execute permissions to the script (chmod).
Check that ftp.sh is in a unix format (see dos2unix) then also check that the user that your TM1 instance is running as has execute permissions to the script (chmod).
Andy Key
-
- Posts: 3
- Joined: Tue May 12, 2020 3:15 am
- OLAP Product: db2
- Version: v11
- Excel Version: 365
Re: TM1 Linux shell
The script runs good from terminal / bash but will not run when called from tm1. We gave it 777 just to be safe.
We even put a simple echo hello world >> log.txt in the script to see if it ran.
We even put a simple echo hello world >> log.txt in the script to see if it ran.
Re: TM1 Linux shell
Are you trying from the user that runs tm1s? Try running
ExecuteCommand ( 'touch /data/disk1/xxx/can_i_create_a_file',1);
and see if has write perms to the folder with your script
and something like
ExecuteCommand ( 'touch ~/can_i_create_a_file',1);
to see that it can generate the file in user home folder.
-
- Posts: 3
- Joined: Tue May 12, 2020 3:15 am
- OLAP Product: db2
- Version: v11
- Excel Version: 365
Re: TM1 Linux shell
We tried both of these. Job ran without errors but nothing was created in either of the commands. No idea what is going on.