#!/bin/sh
#
#NAME
# Fln - find and link into current directory.
#
#SYNOPSIS
#  Fln [dir] pattern
#
#DESCRIPTION
#  This searches through the named directory (.  by default), looking
#  for files whose names match the pattern. When they are found, they
#  are linked into the current directory.
#
#  The pattern match is of the "glob" variety as with other file name
#  matches.  (Maybe we should rewrite this in perl so we can get some
#  better pattern matching.)
#
#  Both directories must be in the same file system, of course.  What
#  happens  if the name already exists in the cwd depends on which ln
#  is on your system.
#
#AUTHOR
#  John Chambers <jc@trillian.mit.edu>

if [ $# -lt 1 ];then set '*'; fi
if [ -d "$1" ];then 
	d=$1
	shift
else	d=.
fi
for	p
do	find $d -name "$p" -exec ln {} . \; 
done 
