#! /bin/sh
# collect names of used files, taken from lsof output
#	by infile ${1}, piped through sort & unid to ${2}, e.g.
#	/usr/sbin/lsof|grep '/usr/'|grep 'lib'|grep '.so'>uloli
# dft $1: "./uloli", $2: "${1}o"

[ -z ${1} ]&&i="./uloli"||i=${1}
[ -z ${2} ]&&o="${1}.u"||o=${2}

echo -n " \
s\" ${i}\" r/o open-file new-chan =: ci ci is-chan	\
decimal							\
begin pad dup 200 ci read-line 0= 			\
while 							\
    if 62 /string stdout write-line 0<	 		\
    else 1 endif 					\
until							\
ci close-file sp> linux pid@ 1 syskill"|f8>${o}
#L4 BUG(?):
# {bye}	terminates the entire script, because implicit <kill>
#	in {bye} removes the entire tree, {syskill} is ok.

echo :ENDE:

sort ${o}|uniq > ${i}.u

