On 23 September 2013 09:43, Ralf Mardorf <ralf.mard...@alice-dsl.net> wrote: > Hi, > > is there a way to set and clear bits of a byte in a bash script, by > using "or" and "and" or has this to be done by an annoying workaround? > > I don't find an answer, when I search the Internet. > > Regards, > Ralf > 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 -- Dr Beco A.I. researcher "Sometimes the heart sees what is invisible to the eye." (H. Jackson Brown Jr.) -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/caluyw2zpv7_9fp98_6p61eqa+c5g_yqba4xzbnwixua0uno...@mail.gmail.com