Friday, 6 September 2013

Want to execute awk from tcl

Want to execute awk from tcl

I want to execute the following line in tcl:
exec awk -F"[][]" '/dB/ { print $2 }' <(amixer sget Master)
but error: missing close-brace appears.
Then I changed it for this:
exec awk -F"[][]" {/dB/ { print $2 }} <(amixer sget Master)
Changing the single quotes with curly brackets. Now the error is:
couldn't read file "(amixer": no such file or directory
Then I changed to this:
exec awk -F{[][]} {/dB/ { print $2 }} <(amixer sget Master)
Still the same error as the latter.
I am really struggling with tcl parsing mechanism of the exec command.
Please help. Thank you.

No comments:

Post a Comment