take data from stdin rather than [fname]
shell scripts so that things are named right