using bash: write bit representation of integer to file

前端 未结 9 929
春和景丽
春和景丽 2020-12-15 20:30

I have a file with binary data and I need to replace a few bytes in a certain position. I\'ve come up with the following to direct bash to the offset and show me that it fou

9条回答
  •  情歌与酒
    2020-12-15 20:48

    If you're willing to rely on bc (which is fairly common)

    echo -e "ibase=16\n obase=2 \n A1" | bc -q
    

    might help.

提交回复
热议问题