This function doing what its name and message states, it checks if the first column of the file passed as an argument contains sorted and unique values otherwise output an error message and exit in failure.
The function code could have been written a more pedagogical way but conciseness was preferred. Here is a more readable variant:
The "<(...)" syntax creates a transient file that is passed to the program as an argument and which contains the result of the command being inside the parenthesis.
Note that "awk '{print $1}' $1" is simply outputting the first column of the file passed as first argument. "$1" has totally different meanings for awk and for the shell.
These 2 Users Gave Thanks to jlliagre For This Post:
Sir,
I using the following commands in a file (part of a bigger script):
#!/bin/bash
cd /opt/oracle/bin
ls -lt | tail -1 | awk '{print $6}' >> /tmp/ramb.out
If I run this from the command prompt the result is:
2007-05-16
if I run it as a cron job then... (5 Replies)
Hi ,
I have a piece of code ...wherein I need to assign the following ...
1) A command line argument to a variable
e.g origCount=ARGV
2) A unix command to a variable
e.g result=`wc -l testFile.txt`
in my awk shell script
When I do this :
print "origCount" origCount --> I get the... (0 Replies)
AIX:Command to get netaddress/subnet address command in IPv4/IP6
Can anybody help us with a command to retrieve netaddress/subnet address command in IPv4/IP6 on aix machine.
net/subnet address is in the format 172.16.212.0(signifies all 255 machines in an IPv4 network) (2 Replies)
Hi everyone,
when executing this command in unix:
echo "WM7 Fatal Alerts:", $(cat query1.txt) > a.csvIt works fine, but running this command in a shell script gives an error saying that there's a syntax error.
here is content of my script:
tdbsrvr$ vi hc.sh
"hc.sh" 22 lines, 509... (4 Replies)
Hi,
Well my title isn't very clear I think. So to understand my goal:
I have a script "test1"
#!/bin/bash
xvkbd -text blabla
with xbindkeys, I bind F5 key in order it runs my test1 script
So when I press F5, test1 runs.
I'm under Emacs/Vi and I press F5 in order to have "blabla" be... (0 Replies)
HI Guys,
I hope you are well. I am trying to write a script that gets executed every time i open a shell (cshell). I have two questions about that
1) I need to enter these commands
$ echo $DISPLAY
$ setenv $DISPLAY output_of_echo_$display_command
How can i write a... (2 Replies)
I am working with a sh script on a solaris 9 zone (sol 10 host) that grabs information to build the configuration command line. the variables Build64, SSLopt, CONFIGopt, and CC are populated in the script. the script includes
CC=`which gcc`
CONFIGopt=' --prefix=/ --exec-prefix=/usr... (8 Replies)
below is the output xml string from some other command and i will be parsing it using awk
cat /tmp/alerts.xml
<Alert id="10102" name="APP-DS-ds_ha-140018-componentFailure-S" alertDefinitionId="13982" resourceId="11427" ctime="1359453507621" fixed="false" reason="If Event/Log Level(ANY) and... (2 Replies)
exec(): 0509-036 Cannot load program /usr/opt/freeware/bin/rpm because of the following errors:
0509-022 Cannot load module /opt/freeware/lib/libintl.a(libintl.so.1).
0509-150 Dependent module /opt/freeware/lib/libiconv.a(shr4.o) could not be loaded.
0509-152 Member... (4 Replies)
Hello Forum,
I'm making very good progress on my report thanks to the very helpful people on this forum. I've been able to successfully create my report for my Red Hat servers. But I do have a few ubuntu servers in the mix and I'd like to capture some data from them when an ssh connection is... (8 Replies)
Discussion started by: greavette
8 Replies
LEARN ABOUT DEBIAN
h5fromh4
H5FROMH4(1) h5utils H5FROMH4(1)NAME
h5fromh4 - convert HDF4 scientific datasets to an HDF5 file
SYNOPSIS
h5fromh4 [OPTION]... [HDF4FILE]...
DESCRIPTION
h5fromh4 takes one or more files in HDF4 format and outputs files in HDF5 format containing the datasets from the HDF4 files. (Currently,
only a single dataset per HDF4 file is converted.)
HDF4 and HDF5 are free, portable binary formats and supporting libraries developed by the National Center for Supercomputing Applications
at the University of Illinois in Urbana-Champaign.
A single h5 file can contain multiple data sets; by default, h5fromh4 creates a dataset called "data", but this can be changed via the -d
option, or by using the syntax HDF5FILE:DATASET with the -o option. The -a option can be used to append new datasets to an existing HDF5
file. If the -o option is used and multiple HDF4 files are specified, all the HDF4 datasets are output into that HDF5 file with the input
filenames (minus the ".hdf" suffix) used as the dataset names.
The most basic usage is something like 'h5fromh4 foo.hdf', which will output a file foo.h5 containing the scientific dataset from foo.hdf.
OPTIONS -h Display help on the command-line options and usage.
-V Print the version number and copyright info for h5fromh4.
-v Verbose output.
-a If the HDF5 output file already exists, append the data as a new dataset rather than overwriting the file (the default behavior).
An existing dataset of the same name within the file is overwritten, however.
-o file
Send HDF5 output to file rather than to the input filename with .hdf replaced with .h5 (the default). If multiple input files were
specified, this causes all input datasets to be stored in file (rather than in separate files), with the input filenames (minus the
.hdf suffix) as the dataset names.
-d name
Write to dataset name in the output; otherwise, the output dataset is called "data" by default. Alternatively, use the syntax
HDF5FILE:DATASET with the -o option.
BUGS
Send bug reports to S. G. Johnson, stevenj@alum.mit.edu.
AUTHORS
Written by Steven G. Johnson. Copyright (c) 2005 by the Massachusetts Institute of Technology.
h5utils March 9, 2002 H5FROMH4(1)