mirror of
https://github.com/yasm/yasm
synced 2026-08-26 22:26:05 -04:00
fewer options for sed, and using a perl script for hexdump. As a side effect, hexdumps are more accurate (the hexdump util put * for as many multiples as were output, whereas the perl script outputs a line for every byte, no matter what). svn path=/trunk/yasm/; revision=736
7 lines
229 B
Perl
Executable file
7 lines
229 B
Perl
Executable file
#! /usr/bin/env perl
|
|
open(BFILE,$ARGV[0]) || die "Could not open \\$ARGV[0]\\: $!";
|
|
while(!eof(BFILE)) {
|
|
read(BFILE, $buffer, 1);
|
|
printf("%02x \n", ord($buffer));
|
|
}
|
|
close(BFILE) || die "Could not close \\$ARGV[0]\\: $!";
|