-------- Forwarded Message -------- From: Ralf Mardorf To: debian-user <[email protected]> Subject: [solved] Set and clear bits in a bash script Date: Mon, 23 Sep 2013 19:34:45 +0200
On Mon, 2013-09-23 at 14:19 -0300, Beco wrote: > Hi Ralf, > > Try this [1] method: > > $let RE="5&1" > $echo $RE > 1 > $let RE="5>>1" > $echo $RE > 2 > > My best! > Beco. > > > > [1] from google keywords "bash script bitwise operations", second result. > > http://my.safaribooksonline.com/book/operating-systems-and-server-administration/linux/0672326426/expressions/ch06lev1sec9 Thank you Beco :) $ let "RESULT=5 | 3" $ echo $RESULT 7 $ let "RESULT=5 & 3" $ echo $RESULT 1 Excellent, exactly what I need. Regards, Ralf Archive: http://lists.debian.org/1379957685.1022.250.camel@archlinux -- ubuntu-studio-users mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-studio-users
