如何使用 linux 命令从二进制文件中读取 e=windows 机器的 2 字节数据?

How to Read 2 byte data from the binary file using the linux command for e=windows machine?

提问人:Megha 提问时间:11/4/2023 最后编辑:francescalusMegha 更新时间:11/4/2023 访问量:17

问:

我想知道相当于以下命令的命令: od −v −t u2 −w4 −一个 datafile.data | ./datafile 适用于 Windows 计算机。这里 ./datafile 是 fortran 编译的 o/p 使用以下命令 gfortran datafile.f -o 数据文件

Get-Content -Raw -编码字节“datafile.data” |ForEach-Object { “{0:D5}” -f [BitConverter]::ToUInt16($_, 0) } |输出文件 - 编码 ASCII -文件路径“输出 .txt

但是,它会产生错误

binaryfiles 十六进制转储

评论


答: 暂无答案