Hi ,
what a wonderful command but so hard to maintain !
i have a file like that :
03/07/2006 05:58:45
03/07/2006 06:58:45
03/07/2006 07:58:50
03/07/2006 08:58:50
and i want to read it and keep only the lines with 3rd field less than 07:00:00
writing it in a second file !
... (2 Replies)
I am trying to write a script that prompts users for date and time, then process the gzip file into awk. During the ksh part of the script another file is created and needs to be processed with a different set of pattern matches then I need to combine the two in the end. I'm stuck at the part... (6 Replies)
OK, so if $0 represent the entire record... can I change $2 and will that be reflected back in $0?
I think the following answers that YES, it does work. But is there anything I should be thinking about prior to doing this? What I am actually doing is part of 5 pages of scripting and awk... (1 Reply)
Dear all,
I need to manipulate some filenames (dump.1, dump.2, etc.) and feed them to another command. For this purpose I am using sed and because my last COMMAND needs to receive files one-by-one I am using xargs:
>> ls dump.* | xargs sed -n 's/expression1/expression2/' | COMMAND
The... (4 Replies)
Hello,
I am having issues generating the output file below from this input file:
Basically, what I want is if the ID= matches with the line below to print the first value in column 3 and the last value of column 4 for the matching ID's. The ID's can repeat more than twice, however, they... (2 Replies)
Hi all,
I need to convert some files with the following name format:
<Base File Name>_YYYYMMDD_HHMISS_NNNNN.*
to:
NNNNNN_<Base File Name>_YYYYMMDD_HHMISS.*
Example:
MY_FILE_NAME_20120912_123443_12345.data
will be converted to
012345_MY_FILE_NAME_20120912_123443.data
Notice that... (9 Replies)
Hallo Family,
I have csv file which has over a million records in it. All i want to do is to change field 2 to have the same value as field 10.
sample file:Now
0860093239,Anonymous,unconditional,+27381230283,Anonymous,unconditional,y,public,,2965511477:0A
Desired output:
... (2 Replies)
Dear friends,
I'm wondering if we could do some simple math on two arrays with the same size?
a1
Fe -0.21886700 -0.01417600 -0.24390300
C 2.20529400 0.89434100 -0.61061000
C -1.89657700 -0.74793000 -0.07778200
C ... (8 Replies)
Hello all,
Can someone help me with write part of code in awk to merge 2 files?
Go through file1 check if number from column 3 exist in file2(column 2) if yes take value from column 1 and add to column 4 in file1. If value in column 4 exist in file1 skip it.
file1... (2 Replies)
Discussion started by: vikus
2 Replies
LEARN ABOUT OSX
rlam
RLAM(1) General Commands Manual RLAM(1)NAME
rlam - laminate records from multiple files
SYNOPSIS
rlam [ -tS ][ -u ][ -iaN | -ifN | -idN | -iiN | -iwN | -ibN ] input1 input2 ..
DESCRIPTION
Rlam simply joins records (or lines) from multiple inputs, separating them with the given string (TAB by default). Different separators
may be given for different files by specifying additional -t options in between each file name. Note that there is no space between this
option and its argument. If none of the input files uses an ASCII separator, then no end-of-line character will be printed, either.
An input is either a stream or a command. Commands are given in quotes, and begin with an exclamantion point ('!'). If the inputs do not
have the same number of lines, then shorter files will stop contributing to the output as they run out.
The -ia option may be used to specify ASCII input (the default), or the -if option may be used to indicated binary IEEE 32-bit floats on
input. Similarly, the -id and -ii options may be used to indicate binary 64-bit doubles or integer words, respectively. The -iw option
specifies 2-byte short words, and the -ib option specifies bytes. If a number is immediately follows any of these options, then it indi-
cates that multiple such values are expected for each record. For example, -if3 indicates three floats per input record for the next named
input. In the case of the -ia option, no number indicates one line per input record, and numbers greater than zero indicate that many
characters exactly per record. For binary input formts, no number implies one value per record. For anything other than EOL-separated
input, the default tab separator is reset to the empty string.
A hyphen ('-') by itself can be used to indicate the standard input, and may appear multiple times. The -u option forces output after each
record (i.e., one run through inputs).
EXAMPLE
To join files output1 and output2, separated by a comma:
rlam -t, output1 output2
To join a file with line numbers (starting at 0) and its reverse:
cnt `wc -l < lam.c` | rlam - -t: lam.c -t '!tail -r lam.c'
To join four data files, each having three doubles per record:
rlam -id3 file1.dbl file2.dbl file3.dbl file4.dbl > combined.dbl
AUTHOR
Greg Ward
SEE ALSO cnt(1), histo(1), neaten(1), rcalc(1), tabfunc(1), total(1)RADIANCE 7/8/97 RLAM(1)