RADIUM_OUTPUT_FILE and "filter"

Russell Fulton r.fulton at auckland.ac.nz
Mon Sep 24 16:15:57 EDT 2007



Wolfgang Barth wrote:
> Hey Carter,
>
>   
>> Hmmmm, this should work, but I'll check into it.  Another way to do it is
>> to use rasplit() attaching to the radium.  Using bash,
>>
>>   rasplit -S radium -M time 1d -w /path/argus-\$srcid.log
>>     
>
> Please, can you explain this a little bit more?
>
> radium -w - | rasplit -r - ...
>
> or what?
>
>   
| is the unix 'pipe' symbol not an 'or'.

Unix programs have a concept of standard in (stdin) and standard out
(stdout) and you can use pipes to hook the stdout of one program to
stdin of the next.   This is what Carter has done here.

the -w - tells radium to write the output to stdout which is then piped
to rasplit which reads its input from stdin ( -r - ) .  - in the place
of a file name is a common convention for stdin/stdout.

many unix programs take their input from stdin and write output to
stdout by default so you can do things like

cat file | sort | unique | cut -b1-10 to get a list of the first 10
bytes of each unique lines in a file (yes, you can do this in one
command with  sort and cut but this is an educational example ;)

Russell





More information about the argus mailing list