[pulseaudio-discuss] pactl and pacmd output formats

Knut-Håvard Aksnes kna at tirsdagsklubben.nu
Mon Oct 27 08:34:21 PDT 2008


Is it possible to add options to the different commands in pactl and 
pacmd to format output in a tabular style, this to make it easier to 
parse the output with sed and/or awk.

One example: I wan't to unload all null sinks, I need to use 
list-modules to get hold of the indices, the problem is that the report 
have index: and name on different lines, with a tabular layout with all 
module info separated by tabs or whitespace one line for each module. I 
can do this using a pipe something like this:
     echo ... |pacmd|sed ... | pacmd
where the substitutions to be done for the ... s are fairly simple.

It is possible to do it whith the current setup too but the sed scripts 
have to be much more complex, these scripts are best written as 
multiliners, involving sed's holdspace.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kna.vcf
Type: text/x-vcard
Size: 517 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20081027/0c600745/attachment.vcf>


More information about the pulseaudio-discuss mailing list