#!/bin/sh # can be written ain ANY language # perform transformations on stdin and put results on stdout # The default (this script) removes null characters and removes # the trailing whitespace on each line # a handy source of sed scripts: http://sed.sourceforge.net/sed1line.txt tr -d '\000' | sed 's/[ \t]*$//'