#!/bin/sh
FILES=`ls $1`for filename in $FILESdo if [ -f $filename ]; then sed -i 's/[ ]*$//g' $filename fidone