My issue is following:
I've got my library (let's call it qa-baslib.sh
) with various util functions, that I'm including it test scripts, we're developing.
Now, other developer created bash script library to support SSH connection to various servers (let's call it global_ssh
). It looks something like:
global_ssh
:
#!/bin/bash
global_ssh(){
# Doing some ssh stuff
}
I'm sourcing that global-ssh
file like that:
qa-baslib.sh
#!/bin/bash
. /<path-to>/qa-util-scripts/global_ssh
function some_util_function() {
server=$1
command=$2
# Here i'm calling global_ssh function
timeout -s 9 30 global_ssh $sever $command
}
But when I finally executing the function, by sourcing it from command line, I got error:
]# . /<path-to>/qa-bashlib.sh
]# some_util_function $server $command
]# timeout: failed to run command `global_ssh': No such file or directory
What's wrong and is there any solution?
Thanks