#!/bin/bash

infile="$1"
outfile=/dev/shm/shitfuckpiss
if [ ! -f "$infile" ] || [ -L $infile ] ; then
    echo USAGE: $0 infile outfile, not-f or -L $infile failed
    exit
fi

#echo Removing trailing whitespace from $infile

sed -e 's/[ \t]*$//' $infile > $outfile
mv $outfile $infile

# cat input.txt | sed 's/[ \t]*$//' > output.txt
