ref: e65baf9637f210075f3a61b2abd516e4418d7b02 dir: /osdir/
#!/bin/rc rfork ne d=`{pwd} a='' while(! p=`{ns | grep ' /mnt/term/.* '^$"d^'[ ]*$' | sed 's,.*/mnt/term([^ ]*).*,\1,g'}) { a=`{basename $"d}^/^$"a d=`{basename -d $"d} } echo $p/$a