ind

  856 downloads
0.12 GPL (GNU General Public License)    
3.5/5 15
ind - indent output from subprocess.

description

download

specifications

changelog

ind - indent output from subprocess. Perfect for scripting. Tested with {free,net,open}BSD, Linux, Solaris, Mac OS X on x86, amd64, alpha, sparc32, sparc64, PPC.

Why the name 'ind'?

If it makes you feel better, you can think of it as meaning "Indent to make reading output Not-Difficult".

Example uses

Let's say you're running a script that has several stages, each producing
some status output. Now you can indent the output from the substages.

>
echo "Stage 1, reconfooberating the ablamatron..."
ind -p "--> " cat blah.txt

echo "Stage 2, burning image..."
ind -p " " growisofs -Z /dev/hdc=randomcrap.img
>

This will produce the output:

>
Stage 1, reconfooberating the ablamatron...
--> This is a text file
--> with only text in it.
Stage 2, burning image...
...
...
...
>

Usage: ./ind [ -h ] [ -p < fmt > ] [ -a < fmt > ] [ -P < fmt > ] [ -A < fmt > ]
< command > < args > ...
-a Postfix stdout (default: "")
-A Postfix stderr (default: "")
-h Show this help text
-p Prefix stdout (default: " ")
-P Prefix stderr (default: ">>")

Format:

Normal text, except:

%% Insert %%
%c Insert output from ctime(3) function
read more   
Last updated on September 2nd, 2008
1  
ind

0 User reviews so far.

SUBMIT