hello,
I want to grep the log file according to time and get the portion of log from one particular time to other.
I can grep for individual lines by time but how should I print lines continuously from given start time till end till given end time.
Appreciate your ideas,
Thanks
chandra (8 Replies)
I would like to write a shell script that will parse through a file similar to the sample below. The data in the file is redirected from rsync into a log file. I would like to call a shell script to parse through and pick out the number beside the percent sign inside the parentheses in the last... (5 Replies)
Hi there,
I'm having some problem with UNIX scripting (ksh), perhaps somebody can help me out?
For example:
------------
Sample content of my log file (text file):
--------------------------------------
File1: ....
info_1 ...
info_2 ...
info_3 ...
File2: ....
info_1 ...
info_2 ...... (10 Replies)
Hi i new to scripting and am trying to create a script to pull my current of logs from /var/logs/secure and name it securelog-Month-Day-Hour.txt
example:
grep 'Mar 5 11' /var/logs/secure > /home/(user)/Documents/Logs/mylog-02-1-11
How do i set the targeted strings to be the current... (2 Replies)
Hye ShamRock
If you can help me with this difficult task for me then it will save my day
Logs :
==================================================================================================================
... (4 Replies)
I have a log file with several IP addresses in it:-
2012-12-06 16:05:05,885 NOTICE **SNMP** Alarm was created: (LicenseClientRejected) Client Remote Peer /125.111.64.125:2573 was
Rejected Property=/125.111.64.125:2573, Client Remote Peer /125.111.64.125:2573 was
Rejected **SNMP**.... (5 Replies)
Hi i am having a logfile which contain lot of entires, but i need extract a word after if i found a line that contains a particular string as "ENROLLMENT_EXCEPTION - Exception". please help me in getting a script to do this.
Regards
C. Suresh (5 Replies)
Hi,
I am trying to grep/extract the number list from this log file, can I get some help on this. I can grep the word 'href' to see the numbers, but it is resulting with the complete line.
Content of my file:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>... (4 Replies)
Hi,
I have a log file (log.txt) that which contains lines of date/time.
I need to create a script to extract a CSV file (out.csv) that gets all the sequential times (with only 1 minute difference) together by stating the start time and end time of this period.
Sample log file (log.txt)
... (7 Replies)
Hi, I would like to seek your help for a script that will extract data from log file and put it in a file.
Sample log file
2018-10-23 12:33:21 AI ERROR -- tpid: SAMPLE_TH account: 123456789 aiSessionNumber: 660640464 mapName: xxx to yyy
errorDesc: Translation Error:ErrorNumber : 993 ... (2 Replies)
Discussion started by: neverwinter112
2 Replies
LEARN ABOUT SUSE
create_foreign_data_wrapper
CREATE FOREIGN DATA WRAPPER(7) SQL Commands CREATE FOREIGN DATA WRAPPER(7)NAME
CREATE FOREIGN DATA WRAPPER - define a new foreign-data wrapper
SYNOPSIS
CREATE FOREIGN DATA WRAPPER name
[ VALIDATOR valfunction | NO VALIDATOR ]
[ OPTIONS ( option 'value' [, ... ] ) ]
DESCRIPTION
CREATE FOREIGN DATA WRAPPER creates a new foreign-data wrapper. The user who defines a foreign-data wrapper becomes its owner.
The foreign-data wrapper name must be unique within the database.
Only superusers can create foreign-data wrappers.
PARAMETERS
name The name of the foreign-data wrapper to be created.
VALIDATOR valfunction
valfunction is the name of a previously registered function that will be called to check the generic options given to the foreign-
data wrapper, as well as to foreign servers and user mappings using the foreign-data wrapper. If no validator function or NO VALIDA-
TOR is specified, then options will not be checked at creation time. (Foreign-data wrappers will possibly ignore or reject invalid
option specifications at run time, depending on the implementation.) The validator function must take two arguments: one of type
text[], which will contain the array of options as stored in the system catalogs, and one of type oid, which will be the OID of the
system catalog containing the options. The return type is ignored; the function should indicate invalid options using the ereport()
function.
OPTIONS ( option 'value' [, ... ] )
This clause specifies options for the new foreign-data wrapper. The allowed option names and values are specific to each foreign
data wrapper and are validated using the foreign-data wrapper library. Option names must be unique.
NOTES
At the moment, the foreign-data wrapper functionality is very rudimentary. The purpose of foreign-data wrappers, foreign servers, and user
mappings is to store this information in a standard way so that it can be queried by interested applications. One such application is
dblink; see in the documentation. The functionality to actually query external data through a foreign-data wrapper library does not exist
yet.
There is currently one foreign-data wrapper validator function provided: postgresql_fdw_validator, which accepts options corresponding to
libpq connection parameters.
EXAMPLES
Create a foreign-data wrapper dummy:
CREATE FOREIGN DATA WRAPPER dummy;
Create a foreign-data wrapper postgresql with validator function postgresql_fdw_validator:
CREATE FOREIGN DATA WRAPPER postgresql VALIDATOR postgresql_fdw_validator;
Create a foreign-data wrapper mywrapper with some options:
CREATE FOREIGN DATA WRAPPER mywrapper
OPTIONS (debug 'true');
COMPATIBILITY
CREATE FOREIGN DATA WRAPPER conforms to ISO/IEC 9075-9 (SQL/MED), with the exception that the VALIDATOR clause is an extension and the
clauses LIBRARY and LANGUAGE are not yet implemented in PostgreSQL.
Note, however, that the SQL/MED functionality as a whole is not yet conforming.
SEE ALSO
ALTER FOREIGN DATA WRAPPER [alter_foreign_data_wrapper(7)], DROP FOREIGN DATA WRAPPER [drop_foreign_data_wrapper(7)], CREATE SERVER [cre-
ate_server(7)], CREATE USER MAPPING [create_user_mapping(7)]
SQL - Language Statements 2010-05-14 CREATE FOREIGN DATA WRAPPER(7)