Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site down
Path: utzoo!linus!philabs!cmcl2!floyd!vax135!houxz!houxm!ihnp4!mgnetp!burl!ulysses!allegra!princeton!down!honey
From: honey@down (code 101)
Newsgroups: net.unix-wizards
Subject: Re: does anybody use IFS in sh?
Message-ID: <243@down>
Date: Fri, 8-Jun-84 11:18:22 EDT
Article-I.D.: down.243
Posted: Fri Jun  8 11:18:22 1984
Date-Received: Sat, 9-Jun-84 08:13:13 EDT
References: <163@callan.UUCP>
Organization: The Official Fun Machine of Princeton Univ. EECS
Lines: 19

i use IFS in my "path" command (sh version of "which"):

	#! /bin/sh
	IFS="${IFS}:"
	for arg do
		file=`basename ${arg}`
		for directory in $PATH; do
			if [ -x ${directory}/${file} ]; then
				echo ${directory}/${file}
			fi
		done
	done

'course i had to haq up test to use -x ...

once upon a time bourne and i bet a quarter on who could cons up a
better script for this ... i spent my winnings chomping inky, blinky,
pinky, and sue.  (he used sed -e 's/:/ /g' on $PATH.)
	peter honeyman