for f in /path/to/files/*RAN*.log do script "$f" > "$f".pd done