07-11-2009
Exactly! I had a feeling that I was missing something obvious. Thanks a bunch.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello,
I have a header which I have to add to a sorted file, however if I use
cat header sortedfile > newfile, the operation takes 2 minutes as the sorted file is over 400mb.
I have noticed that when I sort the 400mb unsorted file, this only takes 14 seconds to create the output.
As... (2 Replies)
Discussion started by: clarcombe
2 Replies
2. Shell Programming and Scripting
Hi,
I have a file with a header line, followed by some contents. How can I sort the file according to header lines?
eg.
/* abcd_005*/
a
bc
/* abcd_001*/
d
e
/* abcd_002*/
x
y
desired output:
/*abcd_001*/ (0 Replies)
Discussion started by: neil.0412
0 Replies
3. Shell Programming and Scripting
Hi,
Please help with this problem. Somehow does not work for me.
test.txt
CHR SNP BP A1 C_A C_U A2 CHISQ P OR
19 rs10401969 19268718 C 222 890 T 0.03462 0.8524 0.9857
1 rs10873889 ... (4 Replies)
Discussion started by: genehunter
4 Replies
4. Shell Programming and Scripting
I am having report file with header and footer . The details in between header and footer are separated by a pipe charater. I want to sort the file by considering multiple columns in between header and footer.
pls help (4 Replies)
Discussion started by: suryanarayana
4 Replies
5. UNIX for Dummies Questions & Answers
How to sort a tab delimited file first on col1 and then on col2. Also I need to keep the header intact.
file.txt
val1 val2 val3 val4
a b c d
m n o p
e f g h
i j k l
... (3 Replies)
Discussion started by: mary271
3 Replies
6. Shell Programming and Scripting
I need to use bash to remove duplicates without using sort first.
I can not use:
cat file | sort | uniq
But when I use only
cat file | uniq
some duplicates are not removed. (4 Replies)
Discussion started by: locoroco
4 Replies
7. UNIX for Dummies Questions & Answers
I have several las files with a header and each file start Version and text and before the data starts end up with ~Ascii, then the numbers starts:
-------------------------------------------------------------------------
Code:
~Version
.....text....
~Ascii
2 abc 230 1 name
1 abc ... (1 Reply)
Discussion started by: tk2000
1 Replies
8. UNIX for Dummies Questions & Answers
I have several las files with a header and each file start Version and text and before the data starts end up with ~Ascii, then the numbers starts:
-------------------------------------------------------------------------
~Version
.....text....
~Ascii
2 abc 230 1 name
1 abc 400 1... (17 Replies)
Discussion started by: tk2000
17 Replies
9. Shell Programming and Scripting
Hi,
I am using SUN SOLARIS (SunOS sun4v sparc SUNW, T5240).
I have a huge data file with header and trailer. This file gets used into an ETL process. ETL skips the header record (which is the first record of the file) and loads the rest of the record. The file can be delimited (comma,... (5 Replies)
Discussion started by: Saanvi1
5 Replies
10. Shell Programming and Scripting
Hi ,
My UNIX system is SUN Solaris.
I am trying to do a simple thing as described below.
I have a PIPE delimited file that has header and trailer. So the file is something like below:
Test1.txt looks like something below:
field_data1|field_data2|and some more data --Header
... (5 Replies)
Discussion started by: Saanvi1
5 Replies
staux(3) Library Functions Manual staux(3)
NAME
staux - Routines that provide scalar interfaces to auxiliaries
SYNOPSIS
#include <syms.h>
long st_auxbtadd(bt)
long bt;
long st_auxbtsize(iaux,width)
long iaux;
long width;
long st_auxisymadd (isym)
long isym;
long st_auxrndxadd (rfd,index)
long rfd;
long index;
long st_auxrndxadd (idn)
long idn;
void st_addtq (iaux,tq)
long iaux;
long tq;
long st_tqhigh_aux(iaux)
long iaux;
void st_shifttq (iaux, tq)
int iaux;
int tq;
long st_iaux_copyty (ifd, psym)
long ifd;
pSYMR psym;
void st_changeaux (iaux, aux)
long iaux;
AUXU aux;
void st_changeauxrndx (iaux, rfd, index)
long iaux;
long rfd;
long index;
DESCRIPTION
Auxiliary entries are unions with a fixed length of four bytes per entry. Much information is packed within the auxiliaries. Rather than
have the compiler front-ends handle each type of auxiliary entry directly, the following set of routines provide a high-level scalar inter-
face to the auxiliaries: Adds a type information record (TIR) to the auxiliaries. It sets the basic type (bt) to the argument and all
other fields to zero. The index to this auxiliary entry is returned. Sets the bit in the TIR, pointed to by the iaux argument. This argu-
ment says the basic type is a bit field and adds an auxiliary with its width in bits. Adds an index into the symbol table (or any other
scalar) to the auxiliaries. It sets the value to the argument that will occupy all four bytes. The index to this auxiliary entry is
returned. Adds a relative index, RNDXR, to the auxiliaries. It sets the rfd and index to their respective arguments. The index to this
auxiliary entry is returned. Works the same as st_auxrndxadd except that RNDXR is referenced by an index into the dense number table.
Copies the type from the specified file (ifd) for the specified symbol into the auxiliary table for the current file. It returns the index
to the new aux. Shifts in the specified type qualifier, tq, into the auxiliary entry TIR, which is specified by the `iaux' index into the
current file. The current type qualifiers shift up one tq so that the first tq (tq0) is free for the new entry. Adds a type qualifier in
the highest or most significant non-tqNil type qualifier. Returns the most significant type qualifier given an index into the files aux
table. Changes the iauxth aux in the current file's auxiliary table to aux. Converts the relative index (RNDXR) auxiliary, which is spec-
ified by iaux, to the specified arguments.
RESTRICTIONS
The interface will added to incrementally, as needed.
RELATED INFORMATION
stfd(3) delim off
staux(3)