#!/bin/sh # @(#) Revision 1.2 - 04/03/99 # rtrim # # Description: Strips trailing whitespace (spaces and tabs) # # Usage: rtrim [file [...]] # Example: rtrim myfile # Example: echo "hi there " | rtrim # # # ============================================================================= # James L. Peterson # peterson@austin.ibm.com # # Bug reports, questions, and suggestions should be emailed to: # mobius@mobius-soft.com # # This software is provided under the terms of the GNU copyleft # (ftp://prep.ai.mit.edu/pub/gnu/COPYING-2.0), without a warranty # of any kind. Use at your own risk. # ============================================================================= # # Note: if you are copying and pasting this script, the characters contained # in the [] below (both instances) are cat $* | sed -e "s/[ ][ ]*$//"