How can I extract data using AWK
I have data as follow
01---------
02-----
03-----
03---
I want to extract data to the file 01.dat,02.dat and 03.dat
the field value should be the part of file name
OutFile="xx"
awk -F"|" '{OutFile = $1; print OutFile}' x1 > $OutFile
echo $OutFile
this... (1 Reply)
I am trying to write an awk program to reformat a data table and convert the date to julian time. I have all the individual steps working, but I am having some issues joing them into one program. Can anyone help me out? Here is my code so far:
# This is an awk program to convert the dates from... (4 Replies)
Dear AWK Users,
I have a data set that is so large (Gigabytes) that it cannot be opened in the vi editor in its entirety. But I can manipulate the entire thing in AWK. It is formatted in a regular manner such that it has the variable descriptions or listings preceeding the variables. The latter... (13 Replies)
Hi guys, I'm having some difficulties in insert some details to the following contents.
I need to insert "TEST" under MIR & a value "25" to the next line.
So far, I am able to insert "TEST" by using awk to capture MIR as the identifier.
However, I am having some difficulties in inserting "25"... (3 Replies)
Hi all,
i have a data array as follows.
array=ertfgj2345
array=456ttygkd
.
.
.
array=errdjt3235
so number or elements in the array can varies depending on how big the data input is.
now i have a variable, and it is $1 (there are $2, $3 and so on, i am only interested in $1).
... (9 Replies)
Hello with sed and tr I have converted my "quite big" cronlist into the below csv file
Here is a sample:
05,15,15,25,35,45,55;*;*;*;*;/SCRIPT1;/SCRIPT1.log
10;6,16;*;*;*;/SCRIPT2;/SCRIPT2.log
30;*;*;*;*;/SCRIPT3;/SCRIPT3.cfg;/SCRIPT3.log
50;8;*;*;*;/SCRIPT4;-1;/SCRIPT4.log ... (6 Replies)
i have a following output file
PF Release 2.4 on SERVICE at Mon Feb 6 18:41:02 2012
---------------------------------------- ----------------
|pPF |SEP |CAPS |CALLS |OPEN |
|-------------------------------------------------------------|
| 0 ---... (1 Reply)
I have this input.|user1 |10.10.10.10 |23|046|1726 (212) |0
|user2 |10.10.10.11 |23|046|43 (17) |0
|test |10.10.10.12 |23|046|45 (10) |0
|test1 |10.10.10.13 |23|046|89 (32) |0
I need to get the data for a user like thisuser1 1726
user2 43
test 45
test1 89... (11 Replies)
Experts ,
Below is the data:
--- Physical volumes ---
PV Name /dev/dsk/c1t2d0
VG Name /dev/vg00
PV Status available
Allocatable yes
VGDA 2
Cur LV 8
PE Size (Mbytes) 8
Total PE 4350
Free PE 2036
Allocated PE 2314
Stale PE 0
IO Timeout (Seconds) default
--- Physical volumes ---... (5 Replies)
Hi!
I have a pretty complex job - at least for me!
i have two csv-files with meassurement-data:
fileA
...... (2 Replies)
Discussion started by: IMPe
2 Replies
LEARN ABOUT SUNOS
mlib_signaldtwkscalarinit_s16
mlib_SignalDTWKScalarInit_S16(3MLIB) mediaLib Library Functions mlib_SignalDTWKScalarInit_S16(3MLIB)NAME
mlib_SignalDTWKScalarInit_S16 - initialization for K-best paths of scalar data
SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ]
#include <mlib.h>
mlib_status mlib_SignalDTWKScalarInit_S16(void *state, const mlib_s16 *dref, mlib_s32 lref, mlib_s32 kbest, mlib_s32 sref, mlib_s32 delta,
mlib_s32 local, mlib_s32 slope);
DESCRIPTION
The mlib_SignalDTWKScalarInit_S16() function initializes the internal state structure for dynamic time warping (DTW) for K-best paths of
scalar data.
The init function performs internal state structure allocation and global initialization. Per DTW function call initialization is done in
DTW function, so the same internal state structure can be reused for multiple DTW function calls.
PARAMETERS
The function takes the following arguments:
dref The reference data array.
lref The length of the reference data array.
kbest The number of the best paths evaluated.
sref The scaling factor of the reference data array, where actual_data = input_data * 2**(-scaling_factor).
delta The delta in the endpoint constraints.
local The type of the local continuity constraints. MLIB_DTW_ITAKURA for Itakura type constraints.
slope The type of the slope weighting. MLIB_DTW_NONE for no slope weighting.
state Pointer to the internal state structure.
RETURN VALUES
The function returns MLIB_SUCCESS if successful. Otherwise it returns MLIB_FAILURE.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Evolving |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO mlib_SignalDTWKScalarInit_S16(3MLIB), mlib_SignalDTWKScalar_S16(3MLIB), mlib_SignalDTWKScalarPath_S16(3MLIB), mlib_SignalDTWKScalar-
Free_S16(3MLIB), attributes(5)SunOS 5.10 9 Nov 2004 mlib_SignalDTWKScalarInit_S16(3MLIB)