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