#!/bin/sh -u # $0 pattern # This creates a directory tree containing rusers and ps output, # makes some links, and then renames and removes the whole tree. # The first argument (mandatory) is a pattern to find in the process listing. # Ian Allen - idallen@ncf.ca Jun 18, 2001 export PATH=/bin:/usr/bin umask 022 mkdir top top/one top/two rusers acadaix.algonquincollege.com | tr ' ' '\n' | head -5 >top/one/today ln top/one/today top/one/aujourdhui ps -f | grep "$1" >top/two/processes ln top/one/today top/two/heute mv top "my junk" rm -r "my junk"