Hi all,
Iam writing a script, which will extract all the files from Start_Date to End_Date. Files are date stamped as YYYYMMDD. For ex:
Start_Date='20051001'
End_Date='20060331'
extract files such as........
ramp_20050810.rpt
ramp_20050915.rpt
ramp_20051001.rpt
ramp_20051010.rpt... (2 Replies)
I am new to Unix so will really appreciate if someone can guide me on this.
What I want to do is:
Step1: Read binary file - pick first 2 bytes, convert from hex to decimal. Read the next 3 bytes as well.
2 bytes will specify the number of bytes 'n' that I want to read and write... (1 Reply)
I need to extract data from logs for a mentioned date range..Its quite urgent can anyone help me out with it..its to be written in unix..just thought its better to specify.. (4 Replies)
My input:
File_1:
2000_t
g1110.b1
abb.1
2001_t
g1111.b1
abb.2
abb.2
g1112.b1
abb.3
2002_t
.
.
File_2:
2000_t Ali england 135
abb.1 Zoe british 150
2001_t Ali england 305
g1111.b1 Lucy russia 126 (6 Replies)
I have a huge file (about 2 millions records) contains data separated by “,” (comma). As part of the requirement, I can't change the format. The objective is to remove some of the records with the following condition. If the 23rd field on each line start with 302 , I need to remove that from the... (4 Replies)
Hi,
I have one file, say file 1, that has data like below where 19900107 is the date,
19900107 12 144 129 0.7380047
19900108 12 168 129 0.3149017
19900109 12 192 129 3.2766666E-02
... (3 Replies)
Hello I would like to ask for help with a script to search a directory that contains many log files and based on a users input after being prompted, they enter a date range down to the hour which searches the files that contain that range.
I dont know how to go about this. I am hoping that the... (5 Replies)
Hi,
I have log file which rolls out every second which is as this.
HttpGenRequest - -<!--OXi dbPublish--> <created="2014-03-24 23:45:37" lastMsgId="" requestTime="0.0333"> <response request="getOutcomeDetails" code="114" message="Request found no matching data" debug="" provider="undefined"/>... (3 Replies)
Hi,
I have logfile like this..
=== 2014-02-09 15:46:59,936 INFO RequestContext - URL: '/eyisp/sc/skins/EY/images/pickers/comboBoxPicker_Over.png', User-Agent: 'Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko': Unsupported with Accept-Encoding header
=== 2015-02-09... (8 Replies)
My unix version is IBM AIX Version 6.1
I tried google my requirement and found the below answer,
find . -newermt “2012-06-15 08:13" ! -newermt “2012-06-15 18:20"
But newer command is not working in AIX version 6.1 unix
I have given my requirement below:
Input:
atr files:
... (1 Reply)
Discussion started by: yuvaa27
1 Replies
LEARN ABOUT LINUX
ncab2clf
ncab2clf(1) User Commands ncab2clf(1)NAME
ncab2clf - convert binary log file to Common Log File format
SYNOPSIS
/usr/bin/ncab2clf [-Dhv] [-i input-file] [-o output-file] [-b size] [-n number] [-s datetime]
DESCRIPTION
The ncab2clf command is used to convert the log file generated by the Solaris Network Cache and Accelerator ("NCA") from binary format, to
Common Log File ("CLF") format. If no input-file is specified, ncab2clf uses stdin. If no output-file is specified, the output goes to std-
out.
OPTIONS -b Specifies the binary-log-file blocking in kilobytes; the default is 64 Kbyte.
-D Specifies that direct I/O be disabled.
-h Prints usage message.
-i input-file Specifies the input file.
-n number Output number CLF records.
-o output-file Specifies the output file.
-s datetime Skip any records before the date and time specified in datetime. You can specify the date and time in CLF format or in the
format specified by the touch(1) utility. CLF format is the dominant format, so ncab2clf first analyzes datetime assuming
CLF.
-v Provides verbose output.
EXAMPLES
Example 1: Converting a Binary File to a Common Log File Format
The following example converts the binary file /var/nca/logs/nca.blf to a file /var/nca/logs/nca.clf, which is in Common Log File format.
example% ncab2clf -D -i /var/nca/logs/nca.blf -o /var/nca/logs/nca.clf
Example 2: Converting Multiple Log Files
The following script may be used to convert multiple log files. The directory designated by "*" must only contain log files.
!/bin/ksh
for filename in *
do
ncab2clf -D < $filename > $filename.clf
done
Example 3: Using -s and -n on a Raw Device
The following example shows how ncab2clf can be used on a raw device. If not using the -n option, the default is to convert all records
from the starting location to the end of the file. The date and time specified with -s, below, is in CLF format.
example% ncab2clf -s '10/Apr/2001:09:23:13' -n 100 < /dev/dsk/c2t1d0s6
EXIT STATUS
The following exit values are returned:
0 The file converted successfully
>0 An error occurred.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWncau |
+-----------------------------+-----------------------------+
|Interface Stability |Evolving |
+-----------------------------+-----------------------------+
SEE ALSO nca(1), ncakmod(1), nca.if(4), ncakmod.conf(4), ncalogd.conf(4), attributes(5)
System Administration Guide: IP Services
NOTES
The binary log files generated by NCA can become very large. When converting these large binary files, use the -b option to the ncab2clf
command to help performance.
Direct I/O is a benefit to the user if the data being written does not come in as large chunks. However, if the user wishes to convert the
log file in large chunks using the -b option, then direct I/O should be disabled by using the -D option.
SunOS 5.10 28 Sep 2001 ncab2clf(1)