$deltok: Difference between revisions

From Scriptwiki
Jump to navigation Jump to search
Doomie (talk | contribs)
No edit summary
 
m tweaking
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
Deletes the Nth token from text.
Deletes the Nth token from text or a range of tokens.
  $deltok(text,N-N2,C)
  $deltok(text,N-N2,C)


Line 5: Line 5:


== Example ==
== Example ==
  [[echo]] -ag $deltok(This is a moo test,4,32)
  [[echo]] -a $deltok(This is a moo test,4,32)
This example will echo ''This is a test'', as ''moo'' is removed from the text.
This example will echo ''This is a test'' to your active window, as ''moo'' is removed from the text.
  [[echo]] -ag $deltok(This is a test for you,-2-1,32)
  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.
This example will also echo ''This is a test'', as the last two words are removed from the text.


[[Category:Token Identfiers]]
[[Category:Token Identifiers]]

Latest revision as of 12:52, 27 February 2006

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.