#!/bin/csh -f #(ie run the cshell on this but don't read the .cshrc) # version = 1.02 of here 2004 Jul 23 # 2004 Jul 23, 1.02: improve documentation # 2002 Dec 9, 1.01: simple list of pointer names if any argument # 2000 Jul 19.05:14:13 origin # here # what are the pointers to the current directory? # documentation: # http://www.lecb.ncifcrf.gov/~toms/nowhere.html # Dr. Thomas D. Schneider # National Cancer Institute # Laboratory of Experimental and Computational Biology # Frederick, Maryland 21702-1201 # toms@ncifcrf.gov # permanent email: toms@alum.mit.edu (use only if first address fails) # http://www.lecb.ncifcrf.gov/~toms/ set pwd = `pwd` # echo $pwd if ($#argv > 0) then # simple list # at the first 'cat' we have the long form of the pointers # lrwxrwxrwx 1 toms delila 8 Dec 9 13:31 test -> /tmp/k/a # Then break out the link names. ls -l ~/now |\ grep $pwd |\ sed -e "s/ / /g" |\ sed -e "s/ / /g" |\ sed -e "s/ / /g" |\ cat |\ sed -e "s/ /@#/8" |\ sed -e "s/ /#@/8" |\ tr "#" "\012" |\ grep -v @ |\ cat else echo find all 'nowhere' pointers to the current directory # grep $pwd `ls -alF ~/now` # gives # Too many words from `` ls -l ~/now |\ grep $pwd |\ sed -e "s/ / /g" |\ sed -e "s/ / /g" |\ sed -e "s/ / /g" |\ cat endif