bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cut (coreutils) 4.5.8 / missing feature


From: Paul Jarc
Subject: Re: cut (coreutils) 4.5.8 / missing feature
Date: Thu, 08 Jan 2004 09:39:39 -0500
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux)

Tjabo Kloppenburg <address@hidden> wrote:
> Sometimes I want to pipe something into "cut" and get everything except
> the last character. Or the last 2 characters.
> I could use perl for that, but cut is smaller and should do the job, too.

FWIW, you can do this with sed.
$ echo foo | sed 's/.$//'
fo
$ echo foo | sed 's/..$//'
f


paul




reply via email to

[Prev in Thread] Current Thread [Next in Thread]