[ale] whitespace

Danny Cox danny at compgen.com
Wed Sep 20 09:42:55 EDT 2000


On Wed, 20 Sep 2000, Ken Nagorski wrote:
> 	Anyone know how  can strip whitespaces off the end of each line of
> a file, be it perl, bash...whatever. There has got to be a way. I just
> can't get it to work?

	sed 's/[ 	][ 	]$//' <file1 >file2
	# that's space & tab in the square brackets above

	perl:

	while (<>) {
		s/\s+$//;
		print;
	}

Danny

--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.





More information about the Ale mailing list