Skip to content

Instantly share code, notes, and snippets.

@joshbooks
Created October 30, 2018 20:06
Show Gist options
  • Save joshbooks/d535be6a1b00d51d493870c329981388 to your computer and use it in GitHub Desktop.
Save joshbooks/d535be6a1b00d51d493870c329981388 to your computer and use it in GitHub Desktop.
Or a bunch of flags together
#!/bin/bash
acc=0
printf "First int to be or'd[1, 0x1]:"
while read input
do
acc=$[$acc | $input]
printf "%0x\n" $acc
printf "Next int to be or'd[1, 0x1, b1]:"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment