Created
August 8, 2019 16:28
-
-
Save thespacedoctor/7d2bd463e57e5dc7515c0f5d66af9791 to your computer and use it in GitHub Desktop.
[Symlink File to Devonthink] #symlink #devonthink
This file contains 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 | |
display_usage() { | |
echo "\nUsage:\n${0##*/} [fileExt(s)] \n" | |
} | |
# if less than two arguments supplied, display usage | |
if [ $# -le 0 ] | |
then | |
display_usage | |
exit 1 | |
fi | |
# check whether user had supplied -h or --help . If yes display usage | |
if [[ ( $# == "--help") || $# == "-h" ]] | |
then | |
display_usage | |
exit 0 | |
fi | |
## assign cl-arguments to varibale names | |
# x-name-cl-argument-variable | |
for i in ${@}; do | |
find "/Users/Dave/Dropbox/devonthink/home projects.dtBase2" -name "*.$i" | while read line; do | |
(ln -s "$line" "/Users/Dave/goodsync_folders/dt_home_projects" || echo "$line symlink exists") | |
done | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment