06-20-2014
To divide file
We have large log files, and we need to extract last four hours lines only,
Please let us know the command.
Thanks,
Saurau.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i need to divide this count by 2, what variable can i use in my script?
26 hcscprod_cpus_totals /2 = 13
13 hcncprod_cpus_totals /2= 6.5
541 ktazp_cpus_totals /2= 270.5
346 ktazd_cpus_totals /2=173
110 ktazi_cpus_totals /2=55
10 ktazq_cpus_totals /2=5 (2 Replies)
Discussion started by: wereyou
2 Replies
2. Shell Programming and Scripting
Can you please help me with writing script for following purpose.
I have to divide single large web access log file into multiple log files based on dates inside the log file.
For example:
if data is logged in the access file for jan-10-08 , jan-11-08 , Jan-12-08
then make small log file... (1 Reply)
Discussion started by: kamleshm
1 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I have a issue dividing 2 values in UNIX
a=15
b=100
c = a / b ==> and it is returning 0 instead of 0.15 into variable C.
How can i resolve this issue ? please help (1 Reply)
Discussion started by: kotasateesh
1 Replies
4. Shell Programming and Scripting
Here is the format of my file; I do not have the delimiter in the file for the data to be separated.
Each line in the file is in the following format. File contains the data of different WebOfferCodes
Item Code | Account Number | Card Number | Source code | WebOfferCode
12digits | 10... (4 Replies)
Discussion started by: enigma_83
4 Replies
5. Shell Programming and Scripting
I have a file, let's say X
BTS 0 UNLOCKED ENABLED NONE
TRX 0 UNLOCKED ENABLED NONE
TRX 1 UNLOCKED ENABLED NONE
BTS 1 UNLOCKED ENABLED NONE
TRX 0 UNLOCKED ENABLED NONE... (4 Replies)
Discussion started by: amaulana
4 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I have a file abc.dat. It contains the fileds of empid, empname, empcity. each city contains 10 records. i want to create the city file and pass the same city records into the file. I don't know the city names.
In unix using awk command how can we do?
abc.dat:
1 john delhi
2... (2 Replies)
Discussion started by: raghukreddy.ab
2 Replies
7. Shell Programming and Scripting
Hi All,
here D Prints the bytes value .plz help to convert the variable D value to MB in new variable $E
D=`more $C |awk '{print $6;}'`
Thanks in Advance.:) (3 Replies)
Discussion started by: netdbaind
3 Replies
8. Shell Programming and Scripting
F= `expr $E/$S`
output
test5.sh: line 45: 1296863.27001857757568359375/21997: No such file or directory
can any one help me ,i just want to divide the $E/$S and Print o/p in F. (3 Replies)
Discussion started by: netdbaind
3 Replies
9. Shell Programming and Scripting
I basically need to do what the title says.
I have my text file.
I'm still pretty new at this.
At the moment I know that:
1. wc -l file.txt
To get the number of lines.
2. ls -lh file.txt
To get the file size.
But I need to divide both numbers. Then I need to save the output in a... (7 Replies)
Discussion started by: PainMaker101
7 Replies
10. Shell Programming and Scripting
Dear ALL,
I have sample file :
tx_bytes: 2422,
tx_packets: 13,
uptime: 16119,
tx_bytes: 2342,
tx_packets: 14,
uptime: 11009,
tx_bytes: 252,
tx_packets: 12,
uptime: 3113,
my formula :
minutes=$(( uptime/60%60 ))
hours=$(( uptime/60/60%24 )) (3 Replies)
Discussion started by: gnulyn
3 Replies
LEARN ABOUT OSF1
filterlog
filterlog(8) System Manager's Manual filterlog(8)
NAME
filterlog - Logs and reports system Correctable Read Data (CRD) memory errors on specific systems.
SYNOPSIS
/usr/sbin/filterlog [-l] [-d crdlog] [-d crdlifetime] [-s crdlength #] [-s crdcount #] [-h]
OPTIONS
Logs or filters an entry from stdin. This option is used by the binary event-log daemon, binlogd. Dumps the contents of the CRD log file
in text format. Errors shown in the file are those recorded by the system since the last boot. Dumps the CRD lifetime log information in
text format. Used to set the CRD interval time in minutes. The default is 24 hours. Used to set the CRD interval count. The default is
50. Prints a list of the command option options defined in this reference page.
DESCRIPTION
This utility ensures that only genuine memory errors are reported to system log files on certain system types. The command filterlog is
called directly by the binary event-log daemon, binlogd to filter system CRD (memory hardware) errors. CRD errors are logged according to
user-definable parameters. If it is determined that a genuine memory problem exists, an entry is passed to binlogd. The error will then
be written to the system's error log file and can be notified to the user through DECevent.
The filterlog utility uses two variables to determine if a CRD error signifies a genuine memory hardware problem -- crdlength and crdcount.
If crdcount number of errors occur during crdlength minutes, an entry is passed to binlogd. The default settings are 50 errors in 24 hours
(1440 minutes).
The filterlog utility reads the /etc/binlog.conf file to determine what log file should be used to record any events. The default log file
is /usr/adm/binary.crdlog.
SEE ALSO
Commands: binlogd(8), dia(8) (DECevent)
filterlog(8)