10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I've been struggling with this one for quite a while and cannot seem to find a solution for this find/replace scenario. Perhaps I'm getting rusty.
I have a file that contains a number of metrics (exactly 3 fields per line) from a few appliances that are collected in parallel. To identify the... (3 Replies)
Discussion started by: verdepollo
2. Shell Programming and Scripting
The awk below executes and produces the current output, which is correct, except I can not seem to include the header lines # and ## in the output as well. I tried adding !/^#/ thinking that it would skip the lines with # and output them but the entire file prints as is. Thank you :).
... (8 Replies)
Discussion started by: cmccabe
3. UNIX for Dummies Questions & Answers
I'm trying to sort 2 different .txt tab delimited files with the command line:
sort -k 1b,1 inputfile > outputfile
But doing that i'm also sorting the header (that ends at the end of my file).
How can i sort a .txt file without sorting the header but conserving the header in the... (3 Replies)
Discussion started by: alisrpp
4. UNIX for Dummies Questions & Answers
Is there a way to write to a txt file each day but retain the header on the file? I'm cat'ing 5 files into one .txt file each day but I want the new data to be written after the first 2 lines which are:
Progname Size Date Owner
Basically I want my new... (4 Replies)
Discussion started by: Grueben
5. Shell Programming and Scripting
I am writing a perl script which checks for the specific column values from a file and writes to the OUT file.
So the feed file has a header information and footer information.
I header information isaround107 lines i.e.
so on ....
... (11 Replies)
Discussion started by: filter
6. UNIX for Dummies Questions & Answers
How can i tweak sendmail configuration files so that the "Received:" field is removed from email header information?
Or else can i change Received: (from enswitch@localhost) in email header to something likeReceived: (from xyz@localhost)?
---------- Post updated at 09:57 PM ---------- Previous... (2 Replies)
Discussion started by: proactiveaditya
7. Shell Programming and Scripting
I have large file with around 100k+ lines. I wanted to retain only the last 100 lines in that file. One way i thought was using
tail -1000 filename > filename1
mv filename1 filename
But there should be a better solution.. Is there a way I can use sed or any such command to change the... (9 Replies)
Discussion started by: nss280
8. Shell Programming and Scripting
There are directories of files that I have to run the dos2ux command on to get ride of the carriage return characters. Easy enough, but I have to retain the original timestamps on the files. I am thinking that I am going to have to strip off the timestamp for each file and convert it to unix time... (3 Replies)
Discussion started by: scotbuff
9. Shell Programming and Scripting
I have written a bash script that I am sharing with an OS X community I am a member of. The purpose of the script is to execute a series of commands for members without them having to get involved with Terminal, as it can be daunting for those with no experience of it at all. I have renamed... (4 Replies)
Discussion started by: baza210
say i have these many file in a directory named exam.
and i create a tar say exam.tar
well the problem is,
when i read the tar file i dont find any metadata about the directories,as you cannot create a tar containig empty directories.
on the... (2 Replies)
Discussion started by: Tanvirk
h5jam(1) General Commands Manual h5jam(1)
h5jam - Add a user block to a HDF5 file
h5jam -u user_block -i in_file.h5 [-o out_file.h5] [--clobber]
h5jam concatenates a user_block file and an HDF5 file to create an HDF5 file with a user block. The user block can be either binary or
text. The output file is padded so that the HDF5 header begins on byte 512, 1024, etc.. (See the HDF5 File Format.)
If out_file.h5 is given, a new file is created with the user_block followed by the contents of in_file.h5. In this case, infile.h5 is
If out_file.h5 is not specified, the user_block is added to in_file.h5.
If in_file.h5 already has a user block, the contents of user_block will be added to the end of the existing user block, and the file
shifted to the next boundary. If --clobber is set, any existing user block will be overwritten.
Create new file, newfile.h5, with the text in file mytext.txt as the user block for the HDF5 file file.h5.
h5jam -u mytext.txt -i file.h5 -o newfile.h5
Add text in file mytext.txt to front of HDF5 dataset, file.h5.
h5jam -u mytext.txt -i file.h5
Overwrite the user block (if any) in file.h5 with the contents of mytext.txt.
h5jam -u mytext.txt -i file.h5 --clobber
h5jam returns the size of the output file, or -1 if an error occurs.
This tool copies all the data (sequentially) in the file(s) to new offsets. For a large file, this copy will take a long time.
The most efficient way to create a user block is to create the file with a user block (see H5Pset_user_block), and write the user block
data into that space from a program.
The user block is completely opaque to the HDF5 library and to the h5jam and h5unjam tools. The user block is simply read or written as a
string of bytes, which could be text or any kind of binary data. It is up to the user to know what the contents of the user block means
and how to process it.
When the user block is extracted, all the data is written to the output, including any padding or unwritten data.
This tool moves the HDF5 file through byte copies, i.e., it does not read or interpret the HDF5 objects.
h5dump(1), h5ls(1), h5diff(1), h5import(1), gif2h5(1), h52gif(1), h5perf(1), h5unjam(1).