Forum Discussion

strain17's avatar
strain17
Icon for Nimbostratus rankNimbostratus
Oct 19, 2016

iApp Script "Exec" Command Quoting Error

Hi,

I'm running into an issue with calling "exec" from an iApp script. I think it has to do with quoting arguments passed to "exec".

Here is the script error:

Saving active configuration...
Script (/Common/test) generated this Tcl error:
script did not successfully complete: (bash: mkdir -p /home/testuser/backup/: No such file or directory
    while executing
"exec ssh testuser@192.168.1.50 -q 'mkdir -p /home/test/backup/'" line:13)

The command within the iApp script is:

exec ssh testuser@192.168.1.50 -q 'mkdir -p /home/test/backup/'

I've tried putting the arguments in a list first but still got the same errors.

Can someone point me in the right direction?

Thanks!

1 Reply

  • Fred_Slater_856's avatar
    Fred_Slater_856
    Historic F5 Account

    If it's the quote, try -q \'mkdir -p /home/test/backup/\'. But it may not be the quote. It may be the path, so next try -q '/bin/mkdir -p /home/test/backup/'.