shithub: neindaw

ref: 191ae360b6afca3e01681baa721b3266d9564599
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