ExifTool Forum

ExifTool => Newbies => Topic started by: j99mac on July 11, 2014, 01:54:13 PM

Title: shortcut User Folder Mac
Post by: j99mac on July 11, 2014, 01:54:13 PM
I am working on a script in Mac OS X I am looking to have a short current for User. I know on Mac $HOME works to add the /User/UserID/ in a file Path.
This is what I have so far.

echo "Enter the file directory of Images Directory "
read input_variable
echo "You entered: $HOME$input_variable as Image Directory"
exiftool - "Make" $HOME"$input_variable" -r 

What do I need to chug to get the script to run with a shortcut so that I do not need to enter /User/UserID/ ?
Title: Re: shortcut User Folder Mac
Post by: Hayo Baan on July 11, 2014, 02:09:23 PM
I'm not sure I follow you, but if you are looking for a way to run a script without having to type the full path to it, you just need to put it in a directory on the PATH. Also, on the command line, the tilde ~ is a shortcut for the user's home directory. So ~/file refers to /Users/userid/file if the user is userid.

Does this answer your question?

Cheers,
Hayo
Title: Re: shortcut User Folder Mac
Post by: j99mac on July 11, 2014, 02:15:57 PM
Sort of I am now trying to get ~/ to work with Exiftools
Title: Re: shortcut User Folder Mac
Post by: Phil Harvey on July 12, 2014, 07:59:08 AM
The ~ is expanded by the shell, so it must not be inside quotes.

- Phil