Avoid collisions between parallel installations of Cygwin

Eric Blake ebb9@byu.net
Wed Oct 21 12:00:00 GMT 2009

According to Corinna Vinschen on 10/21/2009 4:16 AM:
> The data starts at 0x1f7cb4, so the offset is 50 bytes.  What POSIX
> tool allows to stream a file from stdin to stdout while changing
> specified binary data?  Perl, as usual, I assume, but is there some
> simple already existing tool for that?

Well, a combination of simple tools.  A chain of dd commands in a pipeline
will work from a shell script.  I just tested that:

echo 123456789012345678901234567890 > a
{ dd bs=1 count=10; printf 'binary data'; dd bs=1 skip=11; } < a > b

replaced offsets 10-21 of file 'a' with "binary data" in file 'b'.

Don't work too hard, make some time for fun as well!

Eric Blake             ebb9@byu.net

More information about the Cygwin-developers mailing list