#!/bin/sh # ~jhs/public_html/bin/.sh/pwd_no_amd # Convert an AMD path such as /.amd_mnt/flip/foo back to /host/flip/foo # Useful because if one just uses a simple `pwd`, by the time the script # (EG ~jhs/private/bin/.csh/release) that called `pwd` gets round to using # the path, AMD may have automatically unmounted the path. pwd | sed sX^/.amd_mntX/hostX # test: # mkdir -p /usr2/tmp/.amd_mnt/foo ; cd /usr2/tmp/.amd_mnt/foo ; pwd_no_amd