printf, if - then, variables?

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

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

printf, if - then, variables?

Postby broken_hills » Thu Dec 08, 2005 1:24 pm

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: 2140
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia

Postby DataMystic Support » Tue Dec 13, 2005 11:44 am

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.

Simon Carter, - Insulin dose calculator for Type 1 diabetes - 250,000 free software downloads - send huge email attachments

Return to “TextPipe Tips and Tricks, Questions and Support”

Who is online

Users browsing this forum: Google [Bot] and 3 guests