Last active
December 21, 2015 15:59
-
-
Save brock/6330683 to your computer and use it in GitHub Desktop.
Two files: an applescript that runs a bash script when items are added to a folder.
http://wp.me/p2mniA-3Q
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# copy this to ~/bin: cp open-starred-urls.sh ~/bin | |
# make executable: chmod +x ~/bin/open-starred-urls.sh | |
# http://wp.me/p2mniA-3Q | |
cd ~/Dropbox/IFTTT/Desktop | |
for file in *.txt; do | |
cat $file | xargs open | |
mv $file archive | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* | |
run bash script when files added | |
copy to ~/Library/Scripts/Folder Action Scripts: | |
cp run-bash-script-when-files-added.scpt ~/Library/Scripts/Folder\ Action\ Scripts/ | |
http://wp.me/p2mniA-3Q | |
*) | |
on adding folder items to this_folder after receiving added_items | |
try | |
do shell script "~/bin/open-starred-urls.sh" | |
end try | |
end adding folder items to |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment