Sponsored Content
Full Discussion: format log file
Top Forums Shell Programming and Scripting format log file Post 302683159 by Aswex on Tuesday 7th of August 2012 09:53:08 AM
Old 08-07-2012
format log file

Hello,

I am on solaris [ KSH ]

here is what I have

Code:
*****LIST OF ATTRIBUTS FROM FILES*****
FILE='/N1B/2002/05/ACL1B_2002_05_01_B_00.TAR                                                                                                                                                                                                                        ';;
 COMMENT='                                                                                                                                                                                                                                                              '
 FORMAT='                                                                                                                                                                                                                                                              '
 STRUCTURE='                                                                                                                                                                                                                                                              '
 FREE_ATT1='                                                                                                                                                                                                                                                              '
 FREE_ATT2='                                                                                                                                                                                                                                                              '
 PSC='CS3 '
 SSC='    '
 MIG_DATE='          '
 SIZE(Ko)='8193  '
 ORIGIN_OS='UNIX        '
 CRE_DATE='2005-09-15'
 CRE_TIME='08.04.58'
 ARC_DATE='2005-09-15'
 ARC_TIME='08.05.03'
 ARC_USP='SATURNE        '
 RETR_DATE='2005-11-26'
 RETR_TIME='04.30.07'
 RETR_USP='PUBLIC          '
 NB_RETR='5          '
 MODIF_DATE='2005-11-26'
 MODIF_TIME='04.30.07'
;;
STAS034  RC = 0 I Deroulement correct
*****

and here is what I am looking for :

Code:
FILE=/N1B/2002/05/ACL1B_2002_05_01_B_00.TAR
COMMENT=
FORMAT=
STRUCTURE= 
FREE_ATT1= 
FREE_ATT2=
PSC=CS3
SSC= 
MIG_DATE=  
SIZE(Ko)=8193 
ORIGIN_OS=UNIX
CRE_DATE=2005-09-15
CRE_TIME=08.04.58
ARC_DATE=2005-09-15
ARC_TIME=08.05.03
ARC_USP=SATURNE
RETR_DATE=2005-11-26
RETR_TIME=04.30.07
RETR_USP=PUBLIC 
NB_RETR=5
MODIF_DATE=2005-11-26
MODIF_TIME=04.30.07

Please on one line command if possible

Thanks
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Correct format in a log file

I'm trying to read the output of a .sql script (simple insert and commit oracle pl/slq script) to a log file using a shell script. My problem is I end up with a log file that looks like this: sd12@phenix97:/detain/sd12/logs > cat 20071205_detain_20071206.log 12320496 rows created. Commit... (11 Replies)
Discussion started by: sd12
11 Replies

2. Shell Programming and Scripting

convert date format to mysql date format in log file

I have a comma delimited log file which has the date as MM/DD/YY in the 2nd column, and HH:MM:SS in the 3rd column. I need to change the date format to YYYY-MM-DD and merge it with the the time HH:MM:SS. How will I got about this? Sample input 02/27/09,23:52:31 02/27/09,23:52:52... (3 Replies)
Discussion started by: hazno
3 Replies

3. Shell Programming and Scripting

SED - log file format

Hello everyone, I have a log file : \data\file\script\command_0001 \data\file\script\command_0002 \data\file\script\command_0003 I need to make all lines on this way \data\file\script\command_0001 \data\file\script\command_0002 \data\file\script\command_0003 I know this could be done... (11 Replies)
Discussion started by: Aswex
11 Replies

4. UNIX for Dummies Questions & Answers

Format log file

Hi, I need help to format log file that look like this : FILE='/BD_TOTO/MMX_RNX/MMX_RNX_2009_282_0001.TGZ ';; SIZE(Ko)='32528 ' ARC_DATE='2009-10-13' ;;... (6 Replies)
Discussion started by: Aswex
6 Replies

5. UNIX for Dummies Questions & Answers

Log file format!

DO log files have 1 universal format. And if any body know how to depict the $1 to $10 arguments of this file. (4 Replies)
Discussion started by: nixhead
4 Replies

6. Shell Programming and Scripting

Log File - Format

Dear all, I need help to format a log file : Here is the output (Go to the end of the Wrap Code to see caracter at the end of line): FILE='/OPERATIONNEL/SATURNE/PHYS_MOD/NOWMOD/SATURNE_1DAV_20110201_20110202_ICEMOD_R20110202.NC ... (5 Replies)
Discussion started by: Aswex
5 Replies

7. Shell Programming and Scripting

Format log file

Hello, I need help to format log file. I am looking for the most short way to to it here is what I have : /data_val/SATURNE/MASTER/PRE/SATURNE_1dAV_20110301_20110302_T3D_T_FCST_R20110216.nc 3581376 here is what I need : SATURNE_1dAV_20110301_20110302_T3D_T_FCST_R20110216.nc 3581376... (8 Replies)
Discussion started by: Aswex
8 Replies

8. Shell Programming and Scripting

Format log file - SED

Hello, I need help to format a log file...again ; )) Here is what I have : FILE='/OPERATIONNEL/SATURNE/MASTER/SATURNE_MASTER_PRE_R20110119.TAR.GZ ... (5 Replies)
Discussion started by: Aswex
5 Replies

9. Shell Programming and Scripting

Format LOG File

Hello, I just need help to format log file that contain huge amont of lines: Here is what I am getting : STAS022 RC = 0 I Suppression de /OPERATIONNEL/SATURNE/PGN/HD/SATURNE_1DAV_20100415_20110415_ISI_R20110430.NC effectuee STAS034 RC = 0 I Deroulement correct STAF067 RC = 9 E... (7 Replies)
Discussion started by: Aswex
7 Replies

10. Shell Programming and Scripting

Format a log file using sed

I am looking to extract something like this from the below sample log file. 10.28.76.15 SSLC=Z42 71.19.175.130 10.28.76.15 SSLC=Z42 71.19.175.130 10.28.76.15 SSLC=Z42 71.19.175.130 for that I tried something like below and I have no clue how to extract the IP address marked red in the log... (6 Replies)
Discussion started by: Tuxidow
6 Replies
IO::InnerFile(3)					User Contributed Perl Documentation					  IO::InnerFile(3)

NAME
IO::InnerFile - define a file inside another file SYNOPSIS
### Read a subset of a file: $inner = IO::InnerFile->new($fh, $start, $length); while (<$inner>) { ... } DESCRIPTION
If you have a filehandle that can seek() and tell(), then you can open an IO::InnerFile on a range of the underlying file. PUBLIC INTERFACE
new FILEHANDLE, [START, [LENGTH]] Class method, constructor. Create a new inner-file opened on the given FILEHANDLE, from bytes START to START+LENGTH. Both START and LENGTH default to 0; negative values are silently coerced to zero. Note that FILEHANDLE must be able to seek() and tell(), in addition to whatever other methods you may desire for reading it. set_length LENGTH get_length add_length NBYTES Instance methods. Get/set the virtual length of the inner file. set_start START get_start add_start NBYTES Instance methods. Get/set the virtual start position of the inner file. binmode close flush getc getline print LIST printf LIST read BUF, NBYTES readline seek OFFFSET, WHENCE tell write ARGS... Instance methods. Standard filehandle methods. VERSION
$Id: InnerFile.pm,v 1.4 2005/02/10 21:21:53 dfs Exp $ AUTHOR
Original version by Doru Petrescu (pdoru@kappa.ro). Documentation and by Eryq (eryq@zeegee.com). Currently maintained by David F. Skoll (dfs@roaringpenguin.com). perl v5.18.2 2005-02-10 IO::InnerFile(3)
All times are GMT -4. The time now is 01:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy