Re: bitwise shift in shell



fazlin a écrit :
Is there anyway to do bitwise shift operations except using $((...))??

in ksh and bash, like in C language...

* 2 : (( x <<= 1 )) or (( x = x << 1 )) or x=(( $x << 1 ))
/ 2 : (( x >>= 1 )) or (( x = x >> 1 )) or x=(( $x >> 1 ))

Regards, Cordialement,

Cyrille Lefevre.
--
mailto:Cyrille.Lefevre-news%nospam@xxxxxxxxxxxxxxxxxxx
supprimer "%nospam% et ".invalid" pour me repondre.
remove "%nospam" and ".invalid" to answer me.
.



Relevant Pages

  • Re: Now OT: Vogue book.......was Re: Newbie: I still need help, please!
    ... > delete nospam and .invalid to reply ... Michelle Giordano ... Prev by Date: ...
    (alt.sewing)
  • Independence Day
    ... To all the USA folks here: ... Turn up your speakers, click anywhere on the screen and enjoy! ... delete nospam and .invalid to reply ...
    (alt.sewing)
  • Independence Day
    ... To all the U.S.A. folks here: ... Turn up your speakers, click anywhere on the screen and enjoy! ... delete nospam and .invalid to reply ...
    (rec.crafts.textiles.sewing)
  • solaris 2.5 source
    ... supprimer "%nospam% et ".invalid" pour me repondre. ...
    (comp.unix.solaris)
  • Re: printing values of "arrays of pointers"
    ... name and is different enough from common words like spam, invalid, ... nospam etc. ... .invalid domain is guaranteed not to exist, ...
    (comp.lang.c)