$deltok

From Scriptwiki
Revision as of 14:52, 27 February 2006 by Microbe (talk | contribs) (tweaking)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Deletes the Nth token from text or a range of tokens.

$deltok(text,N-N2,C)

Note that you can specify a negative value for N.

Example

echo -a $deltok(This is a moo test,4,32)

This example will echo This is a test to your active window, as moo is removed from the text.

echo -a $deltok(This is a test for you,-2-1,32)

This example will also echo This is a test, as the last two words are removed from the text.