Sponsored Content
Full Discussion: Editing File Headers
Top Forums Shell Programming and Scripting Editing File Headers Post 302543106 by DGPickett on Friday 29th of July 2011 01:35:49 PM
Old 07-29-2011
If you know the differences, you can move the data to a new file using the byte or character options of head and tail, and insert the different bytes in the middle. If they are not text bytes, you can use tr to turn text to binary, like a to 21 octal:
Code:
echo a|tr a '\21'

To mangle it in place, use C or PERL to seek and write the correct bytes. I would doubt the file has a checksum on the header/metadata.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Remove Headers throughout a data file

I have a data file with over 500,000 records/lines that has the header throughout the file. SEQ_ID Name Start_Date Ins_date Add1 Add2 1 Harris 04/02/08 03/02/08 333 Main Suite 101 2 Smith 02/03/08 01/23/08 287 Jenkins SEQ_ID Name ... (3 Replies)
Discussion started by: psmall
3 Replies

2. Shell Programming and Scripting

Remove text between headers while leaving headers intact

Hi, I'm trying to strip all lines between two headers in a file: ### BEGIN ### Text to remove, contains all kinds of characters ... Antispyware-Downloadserver.com (Germany)=http://www.antispyware-downloadserver.c om/updates/ Antispyware-Downloadserver.com #2... (3 Replies)
Discussion started by: Trones
3 Replies

3. UNIX for Dummies Questions & Answers

reading file headers

Hello, I have done much googling on this, but apparently not using the right keywords. I am assuming there is some kind of header for each file on a disk which stores information such as mod time, access time, etc. I have two questions: 1) is there a way to read this header directly,... (2 Replies)
Discussion started by: Allasso
2 Replies

4. Shell Programming and Scripting

Merging of files with different headers to make combined headers file

Hi , I have a typical situation. I have 4 files and with different headers (number of headers is varible ). I need to make such a merged file which will have headers combined from all files (comman coluns should appear once only). For example - File 1 H1|H2|H3|H4 11|12|13|14 21|22|23|23... (1 Reply)
Discussion started by: marut_ashu
1 Replies

5. Shell Programming and Scripting

Editing headers

Hi, I have a folder that contains many (multiple) files 1.fasta 2.fasta 3.fasta 4.fasta 5.fasta . . 100's of files Each such file have data in the following format for example: vi 1.fasta >AB_1 200bp MLKKPIIIGVTGGSGGGKTSVSRAILDSFPNARIAMIQHDSYYKDQSHMSFEERVKTNYDHPLAFDTDFM... (4 Replies)
Discussion started by: Lucky Ali
4 Replies

6. Shell Programming and Scripting

Multiple headers in a file

Hi , I have a .txt file in which I have multiple headers, the header record starts with $ symbol...like the first column name is $Account. I have to keep the header in the first line and delete all the remaining headers which are in the file. I tried using sort adc.txt | uniq -u , but my... (7 Replies)
Discussion started by: gaur.deepti
7 Replies

7. Shell Programming and Scripting

editing headers

Hi, I have a folder that contains many (multiple) files 1.fasta 2.fasta 3.fasta 4.fasta 5.fasta . . 100's of files Each such file have data in the following format for example: vi 1.fasta 58 390 A GTATACATTATTGATGAAGTCCACATGCTTTCTATGGGTGCCTTCAATGCGCTTTTAAAA (7 Replies)
Discussion started by: Lucky Ali
7 Replies

8. Shell Programming and Scripting

Merging File with headers

Hi I need to merge 4 files. The issue i am facing is all the files have headers and i do not want them in the final output file. Can anybody suggest how to do it? (5 Replies)
Discussion started by: Arun Mishra
5 Replies

9. UNIX for Dummies Questions & Answers

Append file name to fasta file headers in Linux

How do we append the file name to fasta file headers in multiple fasta-files in Linux? (10 Replies)
Discussion started by: Mauve
10 Replies

10. UNIX for Advanced & Expert Users

Cannot find logical file format for BSD file headers.

Hi. Unix rookie here. Been looking for a few days for reference documents on how BSD UNIX lays the logical file format onto a disk. Goal is to view/edit with hex editor for data repair. Lots of docs are available for how to use Unix commands (like xxd), but I want to learn the map of how Unix... (4 Replies)
Discussion started by: Chris_top_he_r
4 Replies
DBCAT(1)						      General Commands Manual							  DBCAT(1)

NAME
dbcat - Send audio data to DB Fourier Synthesis daemon SYNOPSIS
dbcat [options] DESCRIPTION
The dbcat tool provides a simple means to feed dbfsd with audio data. Both programs are part of the DBMix project, a digital audio mixing system. dbcat takes input data from its standard input only, and is therefore usually used in a pipe with some other sound generating pro- gram. OPTIONS
-8 Input data comprises of PCM-coded 8bit unsigned samples. (Default: 16bit signed samples.) -c n Connect to channel n of dbfsd. (Default: first channel available.) -d Print out debug messages to console. (Default: debugging disabled.) -h Print summary of available options. -m Input data is a mono stream. (Default: interleaved stereo stream.) -r rate Input data is sampled at rate Hertz. (Default: 44100Hz.) -v Print version information. (Default: no version information.) -S Produce an endless stream of blank audio data (silence). Any input data is dropped. This mode provides a dummy source useful for testing and debugging. (Default: pass on input data.) EXAMPLES
mpg321 -s test.mp3 | dbcat Sends a 16bit/44.1kHz stereo audio stream decoded from test.mp3 off to dbfsd. SEE ALSO
dbin(1), dbfsd(1), dbmixer(1), dbmix(7). AUTHOR
This manual page was written by Daniel Kobras <kobras@debian.org>, for the Debian GNU/Linux system (but may be used by others). It is heavily based on DBMix's README file written by Robert Michael S Dean. August 6, 2002 DBCAT(1)
All times are GMT -4. The time now is 02:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy