[A83] Re: Hex file
[Prev][Next][Index][Thread]
[A83] Re: Hex file
Here's a couple of simple scripts to do it. They work as filters, so you'll
likely need to redirect the input and output. For example, to convert
myprog.hex to myprog.out:
./conv.pl < myprog.hex > myprog.out
You'll also have to make them executable before running them:
chmod +x conv.pl
In fact, since the second one is PHP, I decided to write a nice little web
version too (although command line PHP rules):
http://david.maridia.com/convhex.php
conv.pl:
#!/usr/bin/perl
while (<STDIN>)
{
print substr($_, 9);
}
conv.php:
#!/usr/bin/php4 -q
<?
$fp = fopen("php://stdin", "r");
while (!feof($fp))
echo substr(fgets($fp, 1024), 9);
fclose($fp);
?>
> Is there a program that will automatically take out the colon and the
> first 8 numbers of each line in a hex file? Thanks.
References: