[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] whitespace
- Subject: [ale] whitespace
- From: kenn at pcintelligent.com (Ken Nagorski)
- Date: Wed, 20 Sep 2000 10:08:03 -0400 (EDT)
Now that there is a fine set of reg-exps if I have ever seen one,
:) Thanks
On Wed, 20 Sep 2000, Danny Cox wrote:
> 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.
>
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.