Path: utzoo!utgpu!water!watmath!watdragon!tcjones From: tcjones@watdragon.waterloo.edu (Terry) Newsgroups: comp.unix.questions Subject: Unix shell prgrams and AI techniques Message-ID: <7387@watdragon.waterloo.edu> Date: 15 Jun 88 18:41:31 GMT Distribution: comp Organization: U of Waterloo, Ontario Lines: 32 Here is a shell program I use to see who else is programming at the same time as me. ---------------cut here------------- last > file.last sort < file.last > file.sorted cut -c1-18 < file.sorted > file.cut tr -d ' ' < file.cut > file.names cut -c19- < file.sorted > file.other.data paste file.other.data file.names > file.paste uniq +60 file.paste > file.output grep 'still logged in' file.last > temp.1 cut -f1 -d' ' < temp.1 > file.logged.in sort < file.logged.in > file.sorted.logged.in uniq < file.sorted.logged.in > file2.output fgrep -f file2.output file.output > answerfile.out more answerfile.out ---------------cut here--------------- This program has a lot of problems, uses a lot of CPU and memory. It also prints multiple names, even though I use uniq a few times. I would be really interested to get some AI techniques to improve it. -- "Waterloo - I was defeated, you won the war, Waterloo - promised to love you for evermore. Waterloo - couldn't escape if I wanted to. Waterloo - knowing my fate is to be with you." ABBA.