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
AUPLAY(1)						      General Commands Manual							 AUPLAY(1)

NAME
auplay - play a sound file to a Network Audio System server SYNOPSIS
auplay [-audio servername] [-volume 0-100] [-i] [-I] [-l] files... DESCRIPTION
The auplay program can be used to play audio data stored in the .SND, .AU, or .WAV formats common on Sun workstations and PCs. It is typi- cally used from shell scripts or command line procedures. If no filenames are given on the command line, audio data will be read fron stdin, unless the -l option is given. OPTIONS
The following options may be used with the auplay program: -audio servername This option specifies the Network Audio System server on which the files should be played. -volume 0-100 This option specifies the volume at which the data should be played as a percentage of the maximum possible volume. The default is 100 percent. -i This option indicates that the header information associated with the sound data should be printed along with playing the data. -I This option indicates that the header information associated with the sound data should be printed instead of playing the data. -l This option indicates that a list of filenames is to be read from stdin. auplay will play these files after playing any files given explicitly as command line arguments. SEE ALSO
nas(1), auctl(1), audemo(1), autool(1) COPYRIGHT
Copyright 1993, 1994 Network Computing Devices, Inc. AUTHOR
Greg Renda, Network Computing Devices, Inc. 1.9.3 AUPLAY(1)
All times are GMT -4. The time now is 11:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy