mherger wrote:
> A little perl magic might help:
>
> printf "status 0 1 tags:rate \nexit\n" | nc 127.0.0.1 9090 | perl
> -MURI::Escape -e 'my $br; while (<>){ /bitrate%3a(.*?) /i && ($br.=$1) }
>
> print uri_unescape( $br)'
>
> Less pipes. More readable? Hmm...
>
> --
>
> Michael
;)
readable? you mean the readable from rtfm:rolleyes:
On std. Raspbian your magic doesnt work.
I'd asked you because of "that" looks strange in the meaning of
guessing.
Code:
--------------------
bitrate=$(printf "CA:FE:04:DJ:AN:GO status 0 1 tags:r \nexit\n"|nc
127.0.0.1 9090|sed 's/%3A/:/g')|echo ${bitrate##*:}
--------------------
a one liner without 10 pipes isnt a one liner:cool:
cheers and get the opossum out of your children - they may love it to
death :o
Gruss
Jan
------------------------------------------------------------------------
DJanGo's Profile: http://forums.slimdevices.com/member.php?userid=1516
View this thread: http://forums.slimdevices.com/showthread.php?t=104646
_______________________________________________
diy mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/diy