The four lines below are sample data I am trying to pull out of the blocks of @NAME, @DESC… data. If you examine the @NAME and @DESC data, you will see the data always begin with @NAME and @DATA and they always end with an @FMT statement. Everything else in between is not consistent other than each variable to be evaluated begins with an “@” symbol. The data I’m after are @DESC’s that end in “---X”, “---Y”, or “---Z”. The other @DESC data is not required (like: @DESC: ESS3 MODE or @DESC: 07-10 BATT-2 HEATER EXT PWR CURR MON). I’ve provided sample data with, “---X,Y,Z” and without “---X,Y,Z” data.
When @DESC contains “—X,Y,Z” (like: @DESC: EC10DD002---X SOLID MOTOR #1 CHAMBER PRE), the value of (@ORDER + 1) is required and indicates how many coefficients (@CO:, @C1:, @C2:...) will need to be captured (are associated with) EC10DD002---X.
@DESC @NAME @ORDER + 1 @C0, @C1, @C2, @C3………..
------------- ---------------- -------- ----------------------------------------------------------------------------------------
EC10DD002---X VCSM1_CHMBR_PRS 6 -3.1630863e+00 5.4548164e+00 1.7164921e-02 -1.3902936e-04 5.1083402e-07 -6.9481123e-10
EC13TT002---Z VCENG_LH2_ITMP_L 6 -4.3280551e+02 1.6155632e+00 -2.1858899e-02 1.8099975e-04 -6.9791457e-07 1.0006506e-09
US15SS010---Y VUSBTXTDRSFROABX 2 2.3887317e+01 1.5689024e-01
MC07SS045---X VCBAT_I_1 6 -2.9300203e+00 8.1396875e-01 -1.1731545e-03 1.0239724e-05 -3.5862115e-08 4.9761696e-11
@NAME: ESS3_MODE @STREAM: USERDEF
@DESC: ESS3 MODE @UNITS: COUNTS
@DATAQ_CC @DATAQ_EU
@ENABLE_LIMITS: NO
@PROC_LOC: FRONT END @FEND_NO: 1 @TIME_FMT: BINARY
@RAW_COMP: NONE
@RAW_CONV: NONE
@EU_CAL: NULL
@EU_COMP: NONE
@YEL_LO: 0.000000e+00 @YEL_HI: 1.000000e+00 @RED_LO: -1.000000e-01 @RED_HI: 1.100000e+00
@DYN_LIMS: INACTIVE
@FMT: HEX
@NAME: VCSM1_CHMBR_PRS @STREAM: STR_PCM
@DESC: EC10DD002---X SOLID MOTOR #1 CHAMBER PRE @UNITS: PSIA
@TIME_TAG: NO @ENABLE_LIMITS: YES
@NUM_SYLS: 1
@SYL: 1 @IFRAME: 2 @IWORD: 146 @FR_INC: 2 @WD_INC: 0 @MSB: 7 @LSB: 0
@WD_TYPE: RAW
@RAW_COMP: NONE
@RAW_CONV: NONE
@EU_CAL: NTH @ORDER: 5
@C0: -3.163086e+00 @C1: 5.454816e+00 @C2: 1.716492e-02 @C3: -1.390294e-04
@C4: 5.108340e-07 @C5: -6.948112e-10
@EU_COMP: NONE
@SIM_TYPE: NONE
@YEL_LO: -9.999000e+03 @YEL_HI: 9.999000e+03 @RED_LO: -9.999000e+03 @RED_HI: 9.999000e+03
@DYN_LIMS: ACTIVE @TRANS_LIMS: YES @NUM_EVENTS: 2
@EVENT: 1 @DYN_TRIG: CCPAD_TM_ON_S @DYN_OPER: = @DYN_TVAL: 1.000000e+00
@DEL_Y_LO: 9.978700e+03 @DEL_Y_HI: -9.949300e+03 @DEL_R_LO: 9.978700e+03 @DEL_R_HI: -9.949300e+03
@TIME_ON: 2.000000e+00 @TIME_OFF: 2.000000e+00
@ON_Y_LO: 0.000000e+00 @ON_Y_HI: 0.000000e+00 @ON_R_LO: 0.000000e+00 @ON_R_HI: 0.000000e+00
@OFF_Y_LO: 0.000000e+00 @OFF_Y_HI: 0.000000e+00 @OFF_R_LO: 0.000000e+00 @OFF_R_HI: 0.000000e+00
@EVENT: 2 @DYN_TRIG: VCME_STRT_S @DYN_OPER: = @DYN_TVAL: 1.000000e+00
@DEL_Y_LO: -9.978700e+03 @DEL_Y_HI: 9.949300e+03 @DEL_R_LO: -9.978700e+03 @DEL_R_HI: 9.949300e+03
@TIME_ON: 2.000000e+00 @TIME_OFF: 2.000000e+00
@ON_Y_LO: -9.978700e+03 @ON_Y_HI: 9.949300e+03 @ON_R_LO: -9.978700e+03 @ON_R_HI: 9.949300e+03
@OFF_Y_LO: -9.978700e+03 @OFF_Y_HI: 9.949300e+03 @OFF_R_LO: -9.978700e+03 @OFF_R_HI: 9.949300e+03
@ROC: INACTIVE
@FMT: FLOAT @RES: 3
@NAME: VCENG_LH2_ITMP_L @STREAM: STR_PCM
@DESC: EC13TT002---Z ENG LH2 INLET TEMP, LOW RA @UNITS: DEGF
@DATAQ_EU
@TIME_TAG: NO @ENABLE_LIMITS: NO
@NUM_SYLS: 1
@SYL: 1 @IFRAME: 5 @IWORD: 546 @FR_INC: 10 @WD_INC: 0 @MSB: 7 @LSB: 0
@WD_TYPE: RAW
@RAW_COMP: NONE
@RAW_CONV: NONE
@EU_CAL: NTH @ORDER: 5
@C0: -4.328055e+02 @C1: 1.615563e+00 @C2: -2.185890e-02 @C3: 1.809997e-04
@C4: -6.979146e-07 @C5: 1.000651e-09
@EU_COMP: NONE
@SIM_TYPE: NONE
@YEL_LO: -9.999000e+03 @YEL_HI: 9.999000e+03 @RED_LO: -9.999000e+03 @RED_HI: 9.999000e+03
@DYN_LIMS: INACTIVE
@ROC: INACTIVE
@FMT: FLOAT @RES: 3
@NAME: VUSBTXTDRSFROABX @STREAM: VEH_PCM
@DESC: US15SS010---Y S-BAND XMTR TDRSS FWD RF O @UNITS: W
@DATAQ_EU
@TIME_TAG: NO @ENABLE_LIMITS: YES
@NUM_SYLS: 1
@SYL: 1 @IFRAME: 8 @IWORD: 50 @FR_INC: 10 @WD_INC: 0 @MSB: 7 @LSB: 0
@WD_TYPE: RAW
@RAW_COMP: NONE
@RAW_CONV: NONE
@EU_CAL: NTH @ORDER: 1
@C0: 2.388732e+01 @C1: 1.568902e-01
@EU_COMP: NONE
@SIM_TYPE: NONE
@YEL_LO: -9.999000e+03 @YEL_HI: 9.999000e+03 @RED_LO: -9.999000e+03 @RED_HI: 9.999000e+03
@DYN_LIMS: ACTIVE @TRANS_LIMS: YES @NUM_EVENTS: 3
@EVENT: 1 @DYN_TRIG: USANTB_ON_S @DYN_OPER: = @DYN_TVAL: 1.000000e+00
@DEL_Y_LO: 1.002900e+04 @DEL_Y_HI: -9.934000e+03 @DEL_R_LO: 1.002900e+04 @DEL_R_HI: -9.934000e+03
@TIME_ON: 3.600000e+02 @TIME_OFF: 3.600000e+02
@ON_Y_LO: 0.000000e+00 @ON_Y_HI: 0.000000e+00 @ON_R_LO: 0.000000e+00 @ON_R_HI: 0.000000e+00
@OFF_Y_LO: 0.000000e+00 @OFF_Y_HI: 0.000000e+00 @OFF_R_LO: 0.000000e+00 @OFF_R_HI: 0.000000e+00
@EVENT: 2 @DYN_TRIG: _T_MINUS_5M_CS @DYN_OPER: = @DYN_TVAL: 1.000000e+00
@DEL_Y_LO: -1.002900e+04 @DEL_Y_HI: 9.934000e+03 @DEL_R_LO: -1.002900e+04 @DEL_R_HI: 9.934000e+03
@TIME_ON: 1.000000e-01 @TIME_OFF: 1.000000e-01
@ON_Y_LO: -1.002900e+04 @ON_Y_HI: 9.934000e+03 @ON_R_LO: -1.002900e+04 @ON_R_HI: 9.934000e+03
@OFF_Y_LO: -1.002900e+04 @OFF_Y_HI: 9.934000e+03 @OFF_R_LO: -1.002900e+04 @OFF_R_HI: 9.934000e+03
@EVENT: 3 @DYN_TRIG: _VEH_LMTS_OP_CS @DYN_OPER: = @DYN_TVAL: 1.000000e+00
@DEL_Y_LO: -1.002900e+04 @DEL_Y_HI: 9.934000e+03 @DEL_R_LO: -1.002900e+04 @DEL_R_HI: 9.934000e+03
@TIME_ON: 1.000000e-01 @TIME_OFF: 1.000000e-01
@ON_Y_LO: -1.002900e+04 @ON_Y_HI: 9.934000e+03 @ON_R_LO: -1.002900e+04 @ON_R_HI: 9.934000e+03
@OFF_Y_LO: -1.002900e+04 @OFF_Y_HI: 9.934000e+03 @OFF_R_LO: -1.002900e+04 @OFF_R_HI: 9.934000e+03
@ROC: INACTIVE
@FMT: FLOAT @RES: 3
@NAME: ASALARM_HBT_CS @STREAM: CMDSTAT
@DESC: MAPS VEH ALARM HEARTBEAT ENABLE CMD ST @UNITS: CMD ST
@DATAQ_CC
@EU_CAL: NULL
@FMT: FLOAT @RES: 3
@NAME: VCBAT_I_1 @STREAM: STR_PCM
@DESC: MC07SS045---X BATT CURRENT, SYS 1, STG 1 @UNITS: A
@DATAQ_EU
@TIME_TAG: NO @ENABLE_LIMITS: YES
@NUM_SYLS: 1
@SYL: 1 @IFRAME: 1 @IWORD: 17 @FR_INC: 1 @WD_INC: 400 @MSB: 7 @LSB: 0
@WD_TYPE: RAW
@RAW_COMP: NONE
@RAW_CONV: NONE
@EU_CAL: NTH @ORDER: 5
@C0: -2.930020e+00 @C1: 8.139688e-01 @C2: -1.173154e-03 @C3: 1.023972e-05
@C4: -3.586212e-08 @C5: 4.976169e-11
@EU_COMP: NONE
@SIM_TYPE: NONE
@YEL_LO: -9.999000e+03 @YEL_HI: 9.999000e+03 @RED_LO: -9.999000e+03 @RED_HI: 9.999000e+03
@DYN_LIMS: ACTIVE @TRANS_LIMS: YES @NUM_EVENTS: 5
@EVENT: 1 @DYN_TRIG: CCTM_ON_S @DYN_OPER: = @DYN_TVAL: 1.000000e+00
@DEL_Y_LO: 9.996000e+03 @DEL_Y_HI: -9.984000e+03 @DEL_R_LO: 9.996000e+03 @DEL_R_HI: -9.984000e+03
@TIME_ON: 3.000000e+00 @TIME_OFF: 3.000000e+00
@ON_Y_LO: 0.000000e+00 @ON_Y_HI: 0.000000e+00 @ON_R_LO: 0.000000e+00 @ON_R_HI: 0.000000e+00
@OFF_Y_LO: 0.000000e+00 @OFF_Y_HI: 0.000000e+00 @OFF_R_LO: 0.000000e+00 @OFF_R_HI: 0.000000e+00
@EVENT: 2 @DYN_TRIG: CCSYS1_INT_S @DYN_OPER: = @DYN_TVAL: 1.000000e+00
@DEL_Y_LO: 0.000000e+00 @DEL_Y_HI: 2.000000e+00 @DEL_R_LO: 0.000000e+00 @DEL_R_HI: 2.000000e+00
@TIME_ON: 2.000000e+00 @TIME_OFF: 2.000000e+00
@ON_Y_LO: -9.996000e+03 @ON_Y_HI: 9.984000e+03 @ON_R_LO: -9.996000e+03 @ON_R_HI: 9.984000e+03
@OFF_Y_LO: -9.996000e+03 @OFF_Y_HI: 9.984000e+03 @OFF_R_LO: -9.996000e+03 @OFF_R_HI: 9.984000e+03
@EVENT: 3 @DYN_TRIG: CCID7_TVCPRS_CS @DYN_OPER: = @DYN_TVAL: 1.000000e+00
@DEL_Y_LO: 0.000000e+00 @DEL_Y_HI: 3.000000e+00 @DEL_R_LO: 0.000000e+00 @DEL_R_HI: 3.000000e+00
@TIME_ON: 2.000000e+00 @TIME_OFF: 2.000000e+00
@ON_Y_LO: -9.996000e+03 @ON_Y_HI: 9.982000e+03 @ON_R_LO: -9.996000e+03 @ON_R_HI: 9.982000e+03
@OFF_Y_LO: -9.996000e+03 @OFF_Y_HI: 9.982000e+03 @OFF_R_LO: -9.996000e+03 @OFF_R_HI: 9.982000e+03
@EVENT: 4 @DYN_TRIG: VCID_LO_SW_S @DYN_OPER: = @DYN_TVAL: 1.000000e+00
@DEL_Y_LO: -9.996000e+03 @DEL_Y_HI: 9.982000e+03 @DEL_R_LO: -9.996000e+03 @DEL_R_HI: 9.982000e+03
@TIME_ON: 1.000000e+00 @TIME_OFF: 1.000000e+00
@ON_Y_LO: -9.996000e+03 @ON_Y_HI: 9.982000e+03 @ON_R_LO: -9.996000e+03 @ON_R_HI: 9.982000e+03
@OFF_Y_LO: -9.996000e+03 @OFF_Y_HI: 9.982000e+03 @OFF_R_LO: -9.996000e+03 @OFF_R_HI: 9.982000e+03
@EVENT: 5 @DYN_TRIG: _VEH_LMTS_OP_CS @DYN_OPER: = @DYN_TVAL: 1.000000e+00
@DEL_Y_LO: -9.996000e+03 @DEL_Y_HI: 9.982000e+03 @DEL_R_LO: -9.996000e+03 @DEL_R_HI: 9.982000e+03
@TIME_ON: 1.000000e+00 @TIME_OFF: 1.000000e+00
@ON_Y_LO: -9.996000e+03 @ON_Y_HI: 9.982000e+03 @ON_R_LO: -9.996000e+03 @ON_R_HI: 9.982000e+03
@OFF_Y_LO: -9.996000e+03 @OFF_Y_HI: 9.982000e+03 @OFF_R_LO: -9.996000e+03 @OFF_R_HI: 9.982000e+03
@ROC: INACTIVE
@FMT: FLOAT @RES: 3
@NAME: CCBHTR_EXT2_I @STREAM: GND_PCM
@DESC: 07-10 BATT-2 HEATER EXT PWR CURR MON @UNITS: A
@DATAQ_EU
@TIME_TAG: NO @ENABLE_LIMITS: YES
@NUM_SYLS: 1
@SYL: 1 @IFRAME: 1 @IWORD: 38 @FR_INC: 1 @WD_INC: 0 @MSB: 11 @LSB: 0
@WD_TYPE: RAW
@RAW_COMP: NONE
@RAW_CONV: NONE
@EU_CAL: NTH @ORDER: 1
@C0: -4.479769e-02 @C1: 1.228324e-03
@EU_COMP: NONE
@SIM_TYPE: NONE
@YEL_LO: -3.000000e-01 @YEL_HI: 3.000000e-01 @RED_LO: -5.600000e-01 @RED_HI: 5.600000e-01
@DYN_LIMS: ACTIVE @TRANS_LIMS: YES @NUM_EVENTS: 2
@EVENT: 1 @DYN_TRIG: CCBHTR2_EXTON_CS @DYN_OPER: = @DYN_TVAL: 1.000000e+00
@DEL_Y_LO: 2.800000e+00 @DEL_Y_HI: 4.000000e+00 @DEL_R_LO: 3.060000e+00 @DEL_R_HI: 3.740000e+00
@TIME_ON: 2.000000e+00 @TIME_OFF: 2.000000e+00
@ON_Y_LO: -9.998700e+03 @ON_Y_HI: 9.998700e+03 @ON_R_LO: -9.998440e+03 @ON_R_HI: 9.998440e+03
@OFF_Y_LO: -9.998700e+03 @OFF_Y_HI: 9.998700e+03 @OFF_R_LO: -9.998440e+03 @OFF_R_HI: 9.998440e+03
@EVENT: 2 @DYN_TRIG: _T_MINUS_60S_CS @DYN_OPER: = @DYN_TVAL: 1.000000e+00
@DEL_Y_LO: -1.000150e+04 @DEL_Y_HI: 9.994700e+03 @DEL_R_LO: -1.000150e+04 @DEL_R_HI: 9.994700e+03
@TIME_ON: 1.000000e-01 @TIME_OFF: 1.000000e-01
@ON_Y_LO: -1.000150e+04 @ON_Y_HI: 9.994700e+03 @ON_R_LO: -1.000150e+04 @ON_R_HI: 9.994700e+03
@OFF_Y_LO: -1.000150e+04 @OFF_Y_HI: 9.994700e+03 @OFF_R_LO: -1.000150e+04 @OFF_R_HI: 9.994700e+03
@ROC: INACTIVE
@FMT: FLOAT @RES: 3
Here’s the code I came up with, but it does not give me the results I expected.
My reasoning behind using the if conditions was, I thought I could use the if condition to select the @statements I wanted (and process them) and at the same time it would leave out the @statements I didn’t want. But like I said, I don’t get the results I wanted.
{if ($1~/@NAME/) {n=$2}}
{if ($1~/@DESC/) {d=substr($2,1,15)}
{if ($1~/@EU_CAL/) {c=$4} <<= Here I want @ORDER, but I was using @EU_CAL to get the $4th field.
{if ($1~/@C0/) {a=$0}}
{if ($1~/@C4/) {b=$0}}
print d,n,c,a,b }}
When @DESC contains “—X,Y,Z” (like: @DESC: EC10DD002---X SOLID MOTOR #1 CHAMBER PRE), the value of (@ORDER + 1) is required and indicates how many coefficients (@CO:, @C1:, @C2:...) will need to be captured (are associated with) EC10DD002---X.
@DESC @NAME @ORDER + 1 @C0, @C1, @C2, @C3………..
------------- ---------------- -------- ----------------------------------------------------------------------------------------
EC10DD002---X VCSM1_CHMBR_PRS 6 -3.1630863e+00 5.4548164e+00 1.7164921e-02 -1.3902936e-04 5.1083402e-07 -6.9481123e-10
EC13TT002---Z VCENG_LH2_ITMP_L 6 -4.3280551e+02 1.6155632e+00 -2.1858899e-02 1.8099975e-04 -6.9791457e-07 1.0006506e-09
US15SS010---Y VUSBTXTDRSFROABX 2 2.3887317e+01 1.5689024e-01
MC07SS045---X VCBAT_I_1 6 -2.9300203e+00 8.1396875e-01 -1.1731545e-03 1.0239724e-05 -3.5862115e-08 4.9761696e-11
@NAME: ESS3_MODE @STREAM: USERDEF
@DESC: ESS3 MODE @UNITS: COUNTS
@DATAQ_CC @DATAQ_EU
@ENABLE_LIMITS: NO
@PROC_LOC: FRONT END @FEND_NO: 1 @TIME_FMT: BINARY
@RAW_COMP: NONE
@RAW_CONV: NONE
@EU_CAL: NULL
@EU_COMP: NONE
@YEL_LO: 0.000000e+00 @YEL_HI: 1.000000e+00 @RED_LO: -1.000000e-01 @RED_HI: 1.100000e+00
@DYN_LIMS: INACTIVE
@FMT: HEX
@NAME: VCSM1_CHMBR_PRS @STREAM: STR_PCM
@DESC: EC10DD002---X SOLID MOTOR #1 CHAMBER PRE @UNITS: PSIA
@TIME_TAG: NO @ENABLE_LIMITS: YES
@NUM_SYLS: 1
@SYL: 1 @IFRAME: 2 @IWORD: 146 @FR_INC: 2 @WD_INC: 0 @MSB: 7 @LSB: 0
@WD_TYPE: RAW
@RAW_COMP: NONE
@RAW_CONV: NONE
@EU_CAL: NTH @ORDER: 5
@C0: -3.163086e+00 @C1: 5.454816e+00 @C2: 1.716492e-02 @C3: -1.390294e-04
@C4: 5.108340e-07 @C5: -6.948112e-10
@EU_COMP: NONE
@SIM_TYPE: NONE
@YEL_LO: -9.999000e+03 @YEL_HI: 9.999000e+03 @RED_LO: -9.999000e+03 @RED_HI: 9.999000e+03
@DYN_LIMS: ACTIVE @TRANS_LIMS: YES @NUM_EVENTS: 2
@EVENT: 1 @DYN_TRIG: CCPAD_TM_ON_S @DYN_OPER: = @DYN_TVAL: 1.000000e+00
@DEL_Y_LO: 9.978700e+03 @DEL_Y_HI: -9.949300e+03 @DEL_R_LO: 9.978700e+03 @DEL_R_HI: -9.949300e+03
@TIME_ON: 2.000000e+00 @TIME_OFF: 2.000000e+00
@ON_Y_LO: 0.000000e+00 @ON_Y_HI: 0.000000e+00 @ON_R_LO: 0.000000e+00 @ON_R_HI: 0.000000e+00
@OFF_Y_LO: 0.000000e+00 @OFF_Y_HI: 0.000000e+00 @OFF_R_LO: 0.000000e+00 @OFF_R_HI: 0.000000e+00
@EVENT: 2 @DYN_TRIG: VCME_STRT_S @DYN_OPER: = @DYN_TVAL: 1.000000e+00
@DEL_Y_LO: -9.978700e+03 @DEL_Y_HI: 9.949300e+03 @DEL_R_LO: -9.978700e+03 @DEL_R_HI: 9.949300e+03
@TIME_ON: 2.000000e+00 @TIME_OFF: 2.000000e+00
@ON_Y_LO: -9.978700e+03 @ON_Y_HI: 9.949300e+03 @ON_R_LO: -9.978700e+03 @ON_R_HI: 9.949300e+03
@OFF_Y_LO: -9.978700e+03 @OFF_Y_HI: 9.949300e+03 @OFF_R_LO: -9.978700e+03 @OFF_R_HI: 9.949300e+03
@ROC: INACTIVE
@FMT: FLOAT @RES: 3
@NAME: VCENG_LH2_ITMP_L @STREAM: STR_PCM
@DESC: EC13TT002---Z ENG LH2 INLET TEMP, LOW RA @UNITS: DEGF
@DATAQ_EU
@TIME_TAG: NO @ENABLE_LIMITS: NO
@NUM_SYLS: 1
@SYL: 1 @IFRAME: 5 @IWORD: 546 @FR_INC: 10 @WD_INC: 0 @MSB: 7 @LSB: 0
@WD_TYPE: RAW
@RAW_COMP: NONE
@RAW_CONV: NONE
@EU_CAL: NTH @ORDER: 5
@C0: -4.328055e+02 @C1: 1.615563e+00 @C2: -2.185890e-02 @C3: 1.809997e-04
@C4: -6.979146e-07 @C5: 1.000651e-09
@EU_COMP: NONE
@SIM_TYPE: NONE
@YEL_LO: -9.999000e+03 @YEL_HI: 9.999000e+03 @RED_LO: -9.999000e+03 @RED_HI: 9.999000e+03
@DYN_LIMS: INACTIVE
@ROC: INACTIVE
@FMT: FLOAT @RES: 3
@NAME: VUSBTXTDRSFROABX @STREAM: VEH_PCM
@DESC: US15SS010---Y S-BAND XMTR TDRSS FWD RF O @UNITS: W
@DATAQ_EU
@TIME_TAG: NO @ENABLE_LIMITS: YES
@NUM_SYLS: 1
@SYL: 1 @IFRAME: 8 @IWORD: 50 @FR_INC: 10 @WD_INC: 0 @MSB: 7 @LSB: 0
@WD_TYPE: RAW
@RAW_COMP: NONE
@RAW_CONV: NONE
@EU_CAL: NTH @ORDER: 1
@C0: 2.388732e+01 @C1: 1.568902e-01
@EU_COMP: NONE
@SIM_TYPE: NONE
@YEL_LO: -9.999000e+03 @YEL_HI: 9.999000e+03 @RED_LO: -9.999000e+03 @RED_HI: 9.999000e+03
@DYN_LIMS: ACTIVE @TRANS_LIMS: YES @NUM_EVENTS: 3
@EVENT: 1 @DYN_TRIG: USANTB_ON_S @DYN_OPER: = @DYN_TVAL: 1.000000e+00
@DEL_Y_LO: 1.002900e+04 @DEL_Y_HI: -9.934000e+03 @DEL_R_LO: 1.002900e+04 @DEL_R_HI: -9.934000e+03
@TIME_ON: 3.600000e+02 @TIME_OFF: 3.600000e+02
@ON_Y_LO: 0.000000e+00 @ON_Y_HI: 0.000000e+00 @ON_R_LO: 0.000000e+00 @ON_R_HI: 0.000000e+00
@OFF_Y_LO: 0.000000e+00 @OFF_Y_HI: 0.000000e+00 @OFF_R_LO: 0.000000e+00 @OFF_R_HI: 0.000000e+00
@EVENT: 2 @DYN_TRIG: _T_MINUS_5M_CS @DYN_OPER: = @DYN_TVAL: 1.000000e+00
@DEL_Y_LO: -1.002900e+04 @DEL_Y_HI: 9.934000e+03 @DEL_R_LO: -1.002900e+04 @DEL_R_HI: 9.934000e+03
@TIME_ON: 1.000000e-01 @TIME_OFF: 1.000000e-01
@ON_Y_LO: -1.002900e+04 @ON_Y_HI: 9.934000e+03 @ON_R_LO: -1.002900e+04 @ON_R_HI: 9.934000e+03
@OFF_Y_LO: -1.002900e+04 @OFF_Y_HI: 9.934000e+03 @OFF_R_LO: -1.002900e+04 @OFF_R_HI: 9.934000e+03
@EVENT: 3 @DYN_TRIG: _VEH_LMTS_OP_CS @DYN_OPER: = @DYN_TVAL: 1.000000e+00
@DEL_Y_LO: -1.002900e+04 @DEL_Y_HI: 9.934000e+03 @DEL_R_LO: -1.002900e+04 @DEL_R_HI: 9.934000e+03
@TIME_ON: 1.000000e-01 @TIME_OFF: 1.000000e-01
@ON_Y_LO: -1.002900e+04 @ON_Y_HI: 9.934000e+03 @ON_R_LO: -1.002900e+04 @ON_R_HI: 9.934000e+03
@OFF_Y_LO: -1.002900e+04 @OFF_Y_HI: 9.934000e+03 @OFF_R_LO: -1.002900e+04 @OFF_R_HI: 9.934000e+03
@ROC: INACTIVE
@FMT: FLOAT @RES: 3
@NAME: ASALARM_HBT_CS @STREAM: CMDSTAT
@DESC: MAPS VEH ALARM HEARTBEAT ENABLE CMD ST @UNITS: CMD ST
@DATAQ_CC
@EU_CAL: NULL
@FMT: FLOAT @RES: 3
@NAME: VCBAT_I_1 @STREAM: STR_PCM
@DESC: MC07SS045---X BATT CURRENT, SYS 1, STG 1 @UNITS: A
@DATAQ_EU
@TIME_TAG: NO @ENABLE_LIMITS: YES
@NUM_SYLS: 1
@SYL: 1 @IFRAME: 1 @IWORD: 17 @FR_INC: 1 @WD_INC: 400 @MSB: 7 @LSB: 0
@WD_TYPE: RAW
@RAW_COMP: NONE
@RAW_CONV: NONE
@EU_CAL: NTH @ORDER: 5
@C0: -2.930020e+00 @C1: 8.139688e-01 @C2: -1.173154e-03 @C3: 1.023972e-05
@C4: -3.586212e-08 @C5: 4.976169e-11
@EU_COMP: NONE
@SIM_TYPE: NONE
@YEL_LO: -9.999000e+03 @YEL_HI: 9.999000e+03 @RED_LO: -9.999000e+03 @RED_HI: 9.999000e+03
@DYN_LIMS: ACTIVE @TRANS_LIMS: YES @NUM_EVENTS: 5
@EVENT: 1 @DYN_TRIG: CCTM_ON_S @DYN_OPER: = @DYN_TVAL: 1.000000e+00
@DEL_Y_LO: 9.996000e+03 @DEL_Y_HI: -9.984000e+03 @DEL_R_LO: 9.996000e+03 @DEL_R_HI: -9.984000e+03
@TIME_ON: 3.000000e+00 @TIME_OFF: 3.000000e+00
@ON_Y_LO: 0.000000e+00 @ON_Y_HI: 0.000000e+00 @ON_R_LO: 0.000000e+00 @ON_R_HI: 0.000000e+00
@OFF_Y_LO: 0.000000e+00 @OFF_Y_HI: 0.000000e+00 @OFF_R_LO: 0.000000e+00 @OFF_R_HI: 0.000000e+00
@EVENT: 2 @DYN_TRIG: CCSYS1_INT_S @DYN_OPER: = @DYN_TVAL: 1.000000e+00
@DEL_Y_LO: 0.000000e+00 @DEL_Y_HI: 2.000000e+00 @DEL_R_LO: 0.000000e+00 @DEL_R_HI: 2.000000e+00
@TIME_ON: 2.000000e+00 @TIME_OFF: 2.000000e+00
@ON_Y_LO: -9.996000e+03 @ON_Y_HI: 9.984000e+03 @ON_R_LO: -9.996000e+03 @ON_R_HI: 9.984000e+03
@OFF_Y_LO: -9.996000e+03 @OFF_Y_HI: 9.984000e+03 @OFF_R_LO: -9.996000e+03 @OFF_R_HI: 9.984000e+03
@EVENT: 3 @DYN_TRIG: CCID7_TVCPRS_CS @DYN_OPER: = @DYN_TVAL: 1.000000e+00
@DEL_Y_LO: 0.000000e+00 @DEL_Y_HI: 3.000000e+00 @DEL_R_LO: 0.000000e+00 @DEL_R_HI: 3.000000e+00
@TIME_ON: 2.000000e+00 @TIME_OFF: 2.000000e+00
@ON_Y_LO: -9.996000e+03 @ON_Y_HI: 9.982000e+03 @ON_R_LO: -9.996000e+03 @ON_R_HI: 9.982000e+03
@OFF_Y_LO: -9.996000e+03 @OFF_Y_HI: 9.982000e+03 @OFF_R_LO: -9.996000e+03 @OFF_R_HI: 9.982000e+03
@EVENT: 4 @DYN_TRIG: VCID_LO_SW_S @DYN_OPER: = @DYN_TVAL: 1.000000e+00
@DEL_Y_LO: -9.996000e+03 @DEL_Y_HI: 9.982000e+03 @DEL_R_LO: -9.996000e+03 @DEL_R_HI: 9.982000e+03
@TIME_ON: 1.000000e+00 @TIME_OFF: 1.000000e+00
@ON_Y_LO: -9.996000e+03 @ON_Y_HI: 9.982000e+03 @ON_R_LO: -9.996000e+03 @ON_R_HI: 9.982000e+03
@OFF_Y_LO: -9.996000e+03 @OFF_Y_HI: 9.982000e+03 @OFF_R_LO: -9.996000e+03 @OFF_R_HI: 9.982000e+03
@EVENT: 5 @DYN_TRIG: _VEH_LMTS_OP_CS @DYN_OPER: = @DYN_TVAL: 1.000000e+00
@DEL_Y_LO: -9.996000e+03 @DEL_Y_HI: 9.982000e+03 @DEL_R_LO: -9.996000e+03 @DEL_R_HI: 9.982000e+03
@TIME_ON: 1.000000e+00 @TIME_OFF: 1.000000e+00
@ON_Y_LO: -9.996000e+03 @ON_Y_HI: 9.982000e+03 @ON_R_LO: -9.996000e+03 @ON_R_HI: 9.982000e+03
@OFF_Y_LO: -9.996000e+03 @OFF_Y_HI: 9.982000e+03 @OFF_R_LO: -9.996000e+03 @OFF_R_HI: 9.982000e+03
@ROC: INACTIVE
@FMT: FLOAT @RES: 3
@NAME: CCBHTR_EXT2_I @STREAM: GND_PCM
@DESC: 07-10 BATT-2 HEATER EXT PWR CURR MON @UNITS: A
@DATAQ_EU
@TIME_TAG: NO @ENABLE_LIMITS: YES
@NUM_SYLS: 1
@SYL: 1 @IFRAME: 1 @IWORD: 38 @FR_INC: 1 @WD_INC: 0 @MSB: 11 @LSB: 0
@WD_TYPE: RAW
@RAW_COMP: NONE
@RAW_CONV: NONE
@EU_CAL: NTH @ORDER: 1
@C0: -4.479769e-02 @C1: 1.228324e-03
@EU_COMP: NONE
@SIM_TYPE: NONE
@YEL_LO: -3.000000e-01 @YEL_HI: 3.000000e-01 @RED_LO: -5.600000e-01 @RED_HI: 5.600000e-01
@DYN_LIMS: ACTIVE @TRANS_LIMS: YES @NUM_EVENTS: 2
@EVENT: 1 @DYN_TRIG: CCBHTR2_EXTON_CS @DYN_OPER: = @DYN_TVAL: 1.000000e+00
@DEL_Y_LO: 2.800000e+00 @DEL_Y_HI: 4.000000e+00 @DEL_R_LO: 3.060000e+00 @DEL_R_HI: 3.740000e+00
@TIME_ON: 2.000000e+00 @TIME_OFF: 2.000000e+00
@ON_Y_LO: -9.998700e+03 @ON_Y_HI: 9.998700e+03 @ON_R_LO: -9.998440e+03 @ON_R_HI: 9.998440e+03
@OFF_Y_LO: -9.998700e+03 @OFF_Y_HI: 9.998700e+03 @OFF_R_LO: -9.998440e+03 @OFF_R_HI: 9.998440e+03
@EVENT: 2 @DYN_TRIG: _T_MINUS_60S_CS @DYN_OPER: = @DYN_TVAL: 1.000000e+00
@DEL_Y_LO: -1.000150e+04 @DEL_Y_HI: 9.994700e+03 @DEL_R_LO: -1.000150e+04 @DEL_R_HI: 9.994700e+03
@TIME_ON: 1.000000e-01 @TIME_OFF: 1.000000e-01
@ON_Y_LO: -1.000150e+04 @ON_Y_HI: 9.994700e+03 @ON_R_LO: -1.000150e+04 @ON_R_HI: 9.994700e+03
@OFF_Y_LO: -1.000150e+04 @OFF_Y_HI: 9.994700e+03 @OFF_R_LO: -1.000150e+04 @OFF_R_HI: 9.994700e+03
@ROC: INACTIVE
@FMT: FLOAT @RES: 3
Here’s the code I came up with, but it does not give me the results I expected.
My reasoning behind using the if conditions was, I thought I could use the if condition to select the @statements I wanted (and process them) and at the same time it would leave out the @statements I didn’t want. But like I said, I don’t get the results I wanted.
{if ($1~/@NAME/) {n=$2}}
{if ($1~/@DESC/) {d=substr($2,1,15)}
{if ($1~/@EU_CAL/) {c=$4} <<= Here I want @ORDER, but I was using @EU_CAL to get the $4th field.
{if ($1~/@C0/) {a=$0}}
{if ($1~/@C4/) {b=$0}}
print d,n,c,a,b }}