printf, if - then, variables?

Get help with installation and running here.

Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators

Post Reply
Posts: 1
Joined: Thu Dec 08, 2005 1:07 pm
Location: Andover, MN

printf, if - then, variables?

Post by broken_hills »

I am new to Textpipe but long a user of awk. I was looking for a tool that might simplify construction of what I accomplished in awk, but don't seem to find the analogues of common awk functions and features in TextPipe, for example formatted printing (printf), conditionals (if-else) or even variables. From perusing the forum I see that math functions that are a part of awk can't be done natively in TextPipe either; an external VBScript must be written. Am I missing something here? I got the impression from glowing testimonials on the web site that TextPipe could clobber awk. How do Textpipe users accomplish those functions I mention above? Thanks
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia

Post by DataMystic Support »

Most formatting in TextPipe is usually done after matching a pattern, in which case the formatted output is just a re-arrangement of the matching strings. e.g.

Customer: $1 Address: $2 etc

Conditions and variables are handled using the scripting filter, which allows arbitrarily complex conditions to be met, such as controlling whether the scripting filter's subfilters are turned on or off.

Variables can be misleading because of the way TextPipe processes text in chunks - there is no guarantee that a piece of text will be handled entirely by one filter before the next filter grabs some text and processes it. You can work around this using the 'Restrict to each line' filter for most common cases.
Post Reply