i've created simple bash script that do the following :
#!/usr/bin/env bash
cf ssh "$1"
When I run the command line from the CLI like cf ssh myapp
its running as expected, but when I run the script like
. myscript.sh myapp
I got error: App not found
I dont understand what is the difference, I've provided the app name after I invoke the script , what could be missing here ?
update
when I run the script with the following its working, any idea why the "$1" is not working ...
#!/usr/bin/env bash
cf ssh myapp