Paul L. Snyder on 16 Nov 2009 19:25:06 -0800

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

Re: [PLUG] extended 'cut' functionality?

On Mon, 09 Nov 2009, Randall A Sindlinger wrote:

> Is there anything that provides similar, but extended, functionality to
> count from the _end_ of a string?

  $ echo foobarbaz | tail -c4

n+1 required because of trailing newline.  Note this is bytes, not
actual characters, should that matter for your data.  If you need
something more than counting characters, one of the other fine
suggestions in this thread may serve your purposes.

Philadelphia Linux Users Group         --
Announcements -
General Discussion  --