Jimmy Xu - 17 days ago 5

Bash Question

In my

`bash`

`hex="0x12345678"`

Answer

You can easily bitshift such numbers in an arithmetic context:

```
$ hex="0x12345678"
$ result=$((hex << 1))
$ printf "Result in hex notation: 0x%x\n" "$result"
0x2468acf0
```

Source (Stackoverflow)

Comments