Page 1 of 1

Shell command works in terminal but not as a Launchbar action

Posted: Sat Nov 18, 2017 2:08 am
by jmm
The script below works in Terminal but it doesn't in Launchbar. It generates a unique identifier and sends it to the clipboard.

Code: Select all

#!/bin/sh
#
# LaunchBar Action Script
#
uuidgen | pbcopy


This is what I have done so far:
- I have created an action that is stored in /Users/myself/Library/Application Support/LaunchBar/Actions/Generate Unique Identifier.lbaction
- I have chmod u+x /Users/myself/Library/Application Support/LaunchBar/Actions/Generate Unique Identifier.lbaction/Contents/Scripts/default.sh

Thanks in advance.

Re: Shell command works in terminal but not as a Launchbar action

Posted: Sat Feb 09, 2019 9:18 pm
by giels
I guess your $PATH is different?
You can see it if you change it to:

Code: Select all

#!/bin/sh
#
# LaunchBar Action Script
#
echo $PATH | pbcopy


how to get the same $PATH for the terminal and for LaunchBar I do not know.