On Sep 25, 2017, at 10:22 AM, Michael <keybou...@gmail.com> wrote:
> pushd "$(tmutil latestbackup)"/"$(pwd -P)"

pushd "$(tmutil latestbackup)"/"$(pwd -P)" is better because there is no double 
slash in the path.

But that still doesn't solve the root name of the machine.

The machine name is in /Volumes/ as a link (everything else there is a folder).

ls -d `find /Volumes/ -maxdepth 1 -type l -print` | sed 's/\/Volumes\///'

This seems to work:

pushd "$(tmutil latestbackup)$(ls -d `find /Volumes/ -maxdepth 1 -type l 
-print` | sed 's/\/Volumes\///')$(pwd -P)"

$ pushd "$(tmutil latestbackup)$(ls -d `find /Volumes/ -maxdepth 1 -type l 
-print` | sed 's/\/Volumes\///')$(pwd -P)"
/Volumes/Tardis/Backups.backupdb/jaka/2017-09-26-075907/Jaka/Applications 
/Applications ~
jaka:Applications lbutlr$ pwd
/Volumes/Tardis/Backups.backupdb/jaka/2017-09-26-075907/Jaka/Applications

But there is probably a better way

-- 
Apple broke AppleScripting signatures in Mail.app, so no random signatures.

_______________________________________________
MacOSX-talk mailing list
MacOSX-talk@omnigroup.com
http://www.omnigroup.com/mailman/listinfo/macosx-talk

Reply via email to