On Sun, Jan 25, 2009 at 09:59:25AM -0800, Manuel Rotter wrote:
>...
> for i in 0 1 2 3 4 5 6 7 8 9; do
> cat <<!
> Key $MODKEY-$i
> if [ `wmiir read /ctl | grep ^view | cut -f 2 -d ' '` == "$i" ]
> then
> wmiir xwrite /tag/sel/ctl select up
> else
> wmiir xwrite /ctl view "$i"
> fi
> Key $MODKEY-Shift-$i
> wmiir xwrite /client/sel/tags "$i"
>...
You have to escape the backticks. Try using $(...) instead and
escape the $.
Oh, and i'd just use awk:
wmiir read /ctl | awk '$1 == "view" { print $2 }'
(though you already have $(wi_readctl view) to do that).
-- Kris Maglione If the facts don't fit the theory, change the facts. --Albert EinsteinReceived on Sun Jan 25 2009 - 19:29:04 UTC
This archive was generated by hypermail 2.2.0 : Sun Jan 25 2009 - 19:36:07 UTC