Reputation:
I built a new script that set env and open intellij:
#! /bin/bash
launchctl setenv USERNAM ttt, PASSWORD
1234
#! /bin/bash
open -a "IntelliJ IDEA"
when i ran it on terminal separately it works but when i run on my script im getting this error "open: command not found"
i'm using mac osx
thanks
Upvotes: 0
Views: 353
Reputation:
solution: it was actually an extra space or end of line I made by mistake...
Upvotes: 1
Reputation: 246847
I'm not sure what launchctl setenv ...
does, and how it affects your current shell, but I think your script can be more simply written:
#! /bin/bash
export USERNAM="ttt"
export PASSWORD="1234"
open -a "IntelliJ IDEA"
or
#! /bin/bash
env USERNAM="ttt" PASSWORD="1234" open -a "IntelliJ IDEA"
Upvotes: 0