Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <42EFBC32.2070007@igc.org> Date: Tue, 02 Aug 2005 11:32:18 -0700 From: David Vergin User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Command line edit of binary file Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit I want to write a script to do a minor edit of a binary file. I don't use sed, but as best I can say, what I need would be the equivalent of: sed 's/F:\\/C:\\/g' pugs.exe > pugsfixed.exe But sed (in my unfamiliar hands) seems to mung the binary (beyond what I have asked for). I assume this is because it is expecting a text file. I could write a Perl script to do this. But this task screams "Prior Art!" so this seems like a good opportunity to add another unixy tool to my personal toolkit. Is there a tool available under cygwin to do a command line edit of a binary file? (hexedit works fine for an interactive solution but I want to automate this.) TIA David -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/