Press the icon to add a Shell
Execute tool. Put 'sort' in the
'Excutable' field and /+4 as the first
parameter. Pressing the run icon will
sort the list beginning with column 4
as before. There is, however, no
option to treat the column as numeric,
so we're stuck with the same result as
in figure 4.
Veefu Primer
If I had invented the Unix utility 'grep' and collected just a fraction of a cent each time it was used for
just one year I wouldn't be writing Veefu manuals for a living, I'll tell ya that. Point is grep is one of the
most used utilities ever developed. All it does it match strings in files and text streams, but you'd be
suprised how often you rely on it once you start using it. The reason it's so popular is because it's
easy to use, yet it can form the basis of some pretty complex stuff. We start this tutorial
demonstrating Veefu's grep-like utility: Match.
Figure 1
Figure 2
Figure 3
Figure 4
From the Veefu main screen click the icon
from the top toolbar as in figure 1. A match tool
will appear in the Tool Chain.
Next click 'Add File' to add a file to the file list. Every
tool in Veefu has a File List associated with it. The
list is concatenated and made into a stream for the
tool to process. The file we are using is in figure 2.
Enter 'Sixpack' as the pattern to
match and hit the yellow run icon.
The screen should look like figure
3 with the outgoing stream in the
lower right window.
Let's sort the list. Hit the
button on the toolbar and enter 4
to sort the list on the fourth
column. Output from the previous
tool pipes into the sort tool we just
added. Since the default is an
alphabetic sort, the line with 1200
appears first because 1 is
alphabetically lower than 3 or 9.
While figure 4 is correct, it doesn't
quite seem right. Put an 'n' next to
the 4 to indicate that this column is
to be sorted numerically and hit
the run button. Figure 5 shows
the new sort.
Figure 4
Figure 5
Of course we can also use the built-in Windows
command line sort utility. To run DOS/Windows
commands from Veefu you have to enable the Shell
Execute tool. Select 'Enable Execute Tool' from the
Options menu. This is a persistent option. It will
remain enabled every time you run Veefu from now
on unless you disable it again.
Figure 6
Figure 7
And now we demonstrate one last
tool. The body tool will let us
truncate vertical sections of a text
stream. Add a body tool by pressing
the icon. Enter 'Joe' for the start
text, 95 for the finish text and 1 and
-1 respectively for the start and
finish offsets. This will start the
outgoing text at one line after the
first line encountered with 'Joe'
encountered and finish one line
above the first 95 encountered.
These scripts are all pretty simple,
but don't let that stop you from
building out more meaningful stuff.
There is a tutorial showing how to
build html tables and another that
shows how to scrape web pages, but
don't let that limit you either.
If you need to process text there's
not much you can't do with Veefu.
And if you do come up with
something, drop us a line. We can
add just about anything to this basic
platform.