shithub: neindaw

ref: f759087b2470fc584b7373a9c1ad4a730f4c6c52
dir: /osdir/

View raw version
#!/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