TP 7: player.sh
File contents
#!/bin/sh
ROOT="$1"
[ -d "$ROOT" ] || {
echo "Specify root directory as first argument."
exit 1
}
I=1
MAX=100
while true
do
PEBBLE="$(find "$ROOT" -name "$I")"
[ "$PEBBLE" ] && {
echo "$(basename "$PEBBLE"):$(grep . "$PEBBLE")"
I=$[$I+1]
}
[ "$I" -ge "$MAX" ] && break
done
Click here to get the file


