I need to perform an operation in bash. I have this
401f
I like to perform these operations in bash:
- swap endianness
- from base16
In this way: https://gchq.github.io/CyberChef/#recipe=Swap_endianness('Hex',4,true)From_Base(16)&input=NDAxZg
So the result should be 8000. And I like to do it using the less dependencies as possible. I mean if that can be done using just linux core utils, then nice... I guess that something will be neede. Nnot sure what, maybe xxd, awk and that's ok, but I'd like to avoid the use of bc and stuff like that. Thanks.