shithub: neindaw

ref: 54d0561599f831b9babc4ca8d847139177fe8f7d
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