Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 12-02-2009, 02:15 PM   #1
LQ Newbie
Registered: Jan 2008
Posts: 4

Rep: Reputation: 0
Question 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
Old 12-02-2009, 02:53 PM   #2
LQ 5k Club
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,087

Rep: Reputation: 407Reputation: 407Reputation: 407Reputation: 407Reputation: 407
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.
Old 12-03-2009, 05:37 PM   #3
LQ Newbie
Registered: Jan 2008
Posts: 4

Original Poster
Rep: Reputation: 0

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!



bash, binary, scripting, shell, timestamp

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
convert shell script to a binary executable madhi Programming 13 07-24-2012 09:36 AM
Binary Operator Expected error in Shell Script mangatmodi Programming 9 10-25-2009 01:36 AM
Shell script-How to call tail then exit when 'END timestamp' appears in log? Mountain Linux - Software 4 05-01-2009 02:29 PM
shell script provides an error that a binary operator is required max_rsr Linux - General 1 03-12-2005 08:26 AM
Convert from shell script to binary? Anon123 Linux - General 4 06-26-2004 05:53 AM > Forums > Linux Forums > Linux - Software

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration