I am trying to create a mask and use the bitwise operator "&" to compare with another variable and see the result. Let there be a code:
mask=00000
mesk=00010
mosk=$mask&$mesk
echo $mosk
echo meec
I am trying to extend this functionality to have more characters (different error / success codes), but these lines just don't work. Executing the script will print an empty line, then "meec" ,.
I came from object-oriented programming, and although I have read several documents on this subject, something seems to me to be missing. Any help would be appreciated.
Edit: for some reason the code does not work, it says: "command 00010 not found"> _>
source
share