shithub: neindaw

ref: 8508e91aaf1ffbbd193791c19cfcbe161ef53160
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