#!/bin/sh # /home/tosser/it # The original dead-simple File Tosser v0.01e-6 # # Ian Ward '01, this script has been placed in the public domain ACCESS_LIST="/usr/bin/cut -f 2- /home/tosser/access.list" # ^^ this command must produce a list of file paths # # --> STDIN # \n file requested # # STDOUT --> # [ ] file contents, if file is in access list # read filename $ACCESS_LIST | while read acc do if [ "$filename" == "$acc" -a -f "$acc" ]; then /bin/cat "$acc" break fi done