LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Updating a binary timestamp using shell script (http://www.linuxquestions.org/questions/linux-software-2/updating-a-binary-timestamp-using-shell-script-773029/)

widesteps 12-02-2009 02:15 PM

Updating a binary timestamp using shell script
 
Hi there,

Basically I need to update a timestamp embedded in a binary file.

The timestamp starts at byte 37 and then continues in the following format....

Byte 0-1: 16 bit integer for the year (e.g. 2008)
Byte 2: 8 bit integer for the day (1 31)
Byte 3: 8 bit integer for the month (1 12)
Byte 4: 8 bit integer for the minute
Byte 5: 8 bit integer for the hour
Byte 6: not used
Byte 7: 8 bit integer for the second

How can I accomplish this in a shell script?

I can't seem to grasp it as its dealing with binary integers and not ascii characters which most shell commands seem to be good at manipulating.

Many thanks for any help

tredegar 12-02-2009 02:53 PM

Most people here on LQ will not help you crack proprietary software, which is what your post looks like you'd like to do.

Perhaps I am mistaken.

If you told us a lot more detail, than I am sure further help will be provided.

Or maybe not.

widesteps 12-03-2009 05:37 PM

Simply trying to change the timestamp held in a 1024 byte buffer aka header that is placed on the front of an MP2 audio file that has been through sox and twolame. Doing this inside a bash script (which has already done the audio processing). Hope that is not too proprietary :)

The timestamp should be the absolute start time of the audio.

If noone here wants toi answer. Any pointers to open sites that might be able to help because i don't seem clever enough or expert enough in shell scripting to crack it and I have done a lot of background research intio it and not come up with anything or even a chink of light to then get on and crack it!

cheers


All times are GMT -5. The time now is 09:09 AM.