shithub: neindaw

ref: a6875be771d0b79f59abe6529231d294094b4a23
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