04-02-2009
Command we tried using to grep ERROR from lastest 1 log files from 5 logs files available in that particular directory is:
grep ERROR $(ls -lrt | awk '{ file=$NF } END { print file }')
grep: can't open DistributeImageFilesToTarget_10_dataLocations_PhillipinesDataLocations.xml.log
if i give ls -lrt for all the files in that diretory
-------r-- 1 egdevbb intdev 5022 Apr 2 05:13 DistributeDataFilesToTarget_4_dataLocations_ChinaDataLocations.xml.log
-------r-- 1 egdevbb intdev 1672 Apr 2 05:14 DistributeImageFilesToTarget_14_dataLocations_WHQDataLocations.xml.log
-------r-- 1 egdevbb intdev 7480 Apr 2 05:15 DistributeImageFilesToTarget_60_dataLocations_IndonesiaDataLocations.xml.log
-------r-- 1 egdevbb intdev 2113 Apr 2 05:34 DistributeImageFilesToTarget_8_dataLocations_MalaysiaDataLocations.xml.log
-------r-- 1 egdevbb intdev 2107 Apr 2 05:39 DistributeImageFilesToTarget_10_dataLocations_PhillipinesDataLocations.xml.log
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I am currently taking a Unix programming class in school, I want ot know which is more efficient and quicker, downloading the os or buying the os (4 Replies)
Discussion started by: lavonte
4 Replies
2. UNIX for Dummies Questions & Answers
I want to buy it (2 Replies)
Discussion started by: LANSTARR.COM
2 Replies
3. Shell Programming and Scripting
:o How do I confirm that the script on one server is latest compare to other servers? Is there any script which can tell me the latest version of a file across the servers?
Thanks, (2 Replies)
Discussion started by: Sandy
2 Replies
4. BSD
Any body there ? What is latest BSD version ? (4 Replies)
Discussion started by: chilaka
4 Replies
5. Shell Programming and Scripting
Hi,
In need to write a bash script which will be run periodically to check the files in a target directory. This receives files on an ad hoc basis and the script need to compare the time stamp of the latest file received with system time and write a message to the server log file if the time... (2 Replies)
Discussion started by: mark_s_g
2 Replies
6. Shell Programming and Scripting
I've been finding myself using a log file colorizer written in perl to reformat and colorize the output from many different programs. Mainly, however, I use it to make the output from "tail -f" commands more readable.
The base perl script I use is based on "colorlogs.pl" available from the... (1 Reply)
Discussion started by: rcsteiner
1 Replies
7. AIX
Dears i have a power7 P770 working in AIX 5.3 TL 11 with frimware AM730_066
is the AM730_066 frimware the latest one or not ? (6 Replies)
Discussion started by: thecobra151
6 Replies
8. Shell Programming and Scripting
I am trying to look into multiple directories and pluck out the latest version of a specific file, regardless of where it sits within the directory structure.
Ex:
The file is a .xls file and could have a depth within the directory of anywhere from 1-5
Working directory - Folder1... (6 Replies)
Discussion started by: co21ss
6 Replies
9. Shell Programming and Scripting
Hi,
I have a file which generate Timestamp in this format :-
20121012162354
20121114191610
20121210232808
20121216220002
20130106220002
20130127220001
20130203220001
20121012162354
20121114191610
20121210232808
20121216220002
20130106220002
20130127220001
20130203220001 (2 Replies)
Discussion started by: netdbaind
2 Replies
10. Shell Programming and Scripting
Hi,
I have a file where versions will be updated, i need to get latest/last updated version from that file. Could you please help?
File looks like below -
<versions>
<version>R20180417.006</version>
<version>R20180421.007</version>
<version>R20180421.008</version>
... (5 Replies)
Discussion started by: schandra128
5 Replies
hpiel(1) OpenHPI hpiel(1)
NAME
hpiel - An openhpi sample application that displays HPI event log entries.
SYNOPSIS
hpiel [ -d -e -c -p -r -x -v -h ]
DESCRIPTION
hpiel searches the RPT (Resource Present Table) for resources with SAHPI_CAPABILITY_EVENT_LOG and displays event log entries for resources
found.
OPTIONS
--del, -d display domain event log entries
--entitypath="<arg>", -e "<arg>" display resource event log entries
(e.g. -e "{SYSTEM_CHASSIS,2}{SBC_BLADE,5}")
--clear, -c clear log before reading event log entries
--resource, -p pull resource info along with log entry
--rdr, -r pull RDR info along with log entry
--xml, -x print output in xml format (not implemented)
--verbose, -v print debug messages
--help, -h print this usage message
If neither -d or -e "<arg>" are specified, event log entries will be shown
for all supporting resources by default.
HPI APIs uniquely used in this application
SaErrorT SAHPI_API saHpiEventLogInfoGet (
SAHPI_IN SaHpiSessionIdT SessionId,
SAHPI_IN SaHpiResourceIdT ResourceId,
SAHPI_OUT SaHpiEventLogInfoT *Info );
SaErrorT SAHPI_API saHpiEventLogEntryGet (
SAHPI_IN SaHpiSessionIdT SessionId,
SAHPI_IN SaHpiResourceIdT ResourceId,
SAHPI_IN SaHpiEventLogEntryIdT EntryId,
SAHPI_OUT SaHpiEventLogEntryIdT *PrevEntryId,
SAHPI_OUT SaHpiEventLogEntryIdT *NextEntryId,
SAHPI_OUT SaHpiEventLogEntryT *EventLogEntry,
SAHPI_INOUT SaHpiRdrT *Rdr,
SAHPI_INOUT SaHpiRptEntryT *RptEntry );
SaErrorT SAHPI_API saHpiEventLogClear (
SAHPI_IN SaHpiSessionIdT SessionId,
SAHPI_IN SaHpiResourceIdT ResourceId );
SEE ALSO
AUTHORS
Authors of this man page:
Peter D Phan (pdphan@users.sourceforge.net)
2.14.1 2009-11-23 hpiel(1)