Universal path in Terminal
You can get the machine name with scutil --get ComputerName and the name of the boot volume with 

basename "`find -x /Volumes/ -type l`"


Note that both of these may well return a string containing spaces. So you want to do this

COMPUTER="`scutil --get ComputerName`"
VOLUME="`basename \"\`find -x /Volumes/ -type l\`\""


then

TIMEPATH="/Volumes/Time Machine/Backups.backupdb/$COMPUTER/$VOLUME/Users"