02-01-2010
Korn/bash Script to monitor a file a check for specific data
Hi,
Im trying to write this script but im stuck on it, basicaly what i want to do is to write a code to verify a log file ( apache log file for example ) and for each new line with specific data , then, output this new line for another file:
full ex:
output of the server.log is ( new line each 0.5 secs )
new connection..
new connection..
new connection..
blocked....
denied >> this new line should be picked
sorry for my english, not very clear...
Thanks in advance.
9 More Discussions You Might Find Interesting
1. AIX
we have tranferred an ear from local server to remote server using ftp.consider, we have an ear file named a.ear in remote server,again if we transfer the same file named a.ear from local server to remote server.we need the kshell to check the existence of the ear file in remote server,and if the... (3 Replies)
Discussion started by: karthikprasathk
3 Replies
2. Shell Programming and Scripting
Hi,
I am new to this unix scripting, I got a requirement like..
Files with *.XML extension will be generating in a /home/sample/ folder for every 15 mins. I need to monitor those files in that particular folder for every hour.
If no file has been generated in that particular folder for an... (7 Replies)
Discussion started by: siri_886
7 Replies
3. Shell Programming and Scripting
Hi,
I have two text files. Need to create a third text file extracting specific data from first two existing files..
Text File 1: Format contains:
SQL*Loader: Release 10.2.0.1.0 - Production on Wed Aug 4 21:06:34 2010
some text ............so on...and somwhere text like:
Record 1:... (1 Reply)
Discussion started by: shashi143ibm
1 Replies
4. Shell Programming and Scripting
Hi All ,
I have one file like below ,
Owner name = abu2-kxy-m29.hegen.app
Item_id = AX1981, special_id = *NULL*, version = 1
Created = 09/01/2010 12:56:56 (1283389016)
Enddate = 03/31/2011 00:00:00 (1301554800)
From the above file I need to get the output in the below format ,i need... (3 Replies)
Discussion started by: gnanasekar_beem
3 Replies
5. Shell Programming and Scripting
I need help as to how to write a script in Unix for the following:
We have 3 servers;
The mainframe will FTP them to a folder. In that folder we will need the script to look and see if the specific file name is there and load it to the correct table.
Can anyone pls help me out with... (2 Replies)
Discussion started by: msrahman
2 Replies
6. Shell Programming and Scripting
Hi,
i am new to shell scripts, i need to write a script that can monitor size of directory of specific users. Please help.
Thanks,
Nitin (2 Replies)
Discussion started by: nicksrulz
2 Replies
7. Shell Programming and Scripting
Hi,
I am trying to put together a Korn Shell script to insert at a specific line.
The system we use is SunOS 5.10
I can get the line number by using:-
num=`sed -n '/export ENV/=' ./tmp.file`
Not getting much headway using the above variable's value to insert -
export SYBASE=/opt/sybase15... (5 Replies)
Discussion started by: aj8200
5 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I have a value stored in x and I need to compare it to the numbers in every other line of a file. The file contains alternating lines of numbers and letters:
aaaa1111
AAAAAAAA
bbbb2222
BBBBBBBB
cccc3333
CCCCCCCC
I need to compare x to the numbers in every other line without the... (2 Replies)
Discussion started by: ShiGua
2 Replies
9. Shell Programming and Scripting
Hi All
I have a file which has five columns in each rows.
cat file.txt
a|b|c|d|e
1|2|3|4|5
a1|a2|a3|a4|a5
.
.
.
I need to make sure that there are no less than five or more than five columns (in all the rows) by mistake. I tried this :
cat file.txt | awk 'BEGIN{FS="|"};{print... (3 Replies)
Discussion started by: chatwithsaurav
3 Replies
IMAPD(8) System Manager's Manual IMAPD(8)
*
NAME
imapd - IMAP server process
SYNOPSIS
imapd [ -C config-file ] [ -U uses ] [ -T timeout ] [ -D ]
[ -s ] [ -N ] [ -p ssf ]
DESCRIPTION
Imapd is an IMAP4rev1 server. It accepts commands on its standard input and responds on its standard output. It MUST be invoked by cyr-
master(8) with those descriptors attached to a remote client connection.
Imapd reads its configuration options out of the imapd.conf(5) file unless specified otherwise by -C.
If the file msg/shutdown is created under the directory specified in the configdirectory configuration option, then imapd will shut down
the connection, sending the first line contained in the file to the client as the reason. New connections are denied.
If the file msg/motd is created under the directory specified in the configdirectory configuration option, then imapd will send the first
line contained in the file to clients upon connect as an ALERT message which IMAP-compliant clients are required to display. This option
serves to annoy users mostly. Unfortunately clients tend to connect far more frequently than is apparent, causing each connection to gen-
erate a seperate server ALERT for each connection. Many clients do not display these properly, if they do anything with them at all.
If the directory log/user exists under the directory specified in the configdirectory configuration option, then imapd will create protocol
telemetry logs for sessions authenticating as user. The telemetry logs will be stored in the log/user directory with a filename of the
imapd process-id.
OPTIONS
-C config-file
Read configuration options from config-file.
-U uses
The maximum number of times that the process should be used for new connections before shutting down. The default is 250.
-T timeout
The number of seconds that the process will wait for a new connection before shutting down. Note that a value of 0 (zero) will dis-
able the timeout. The default is 60.
-D Run external debugger specified in debug_command.
-s Serve IMAP over SSL (imaps). All data to and from imapd is encrypted using the Secure Sockets Layer.
-N Bypass password checking. (Not recommended unless you know what you're doing.)
-p ssf Tell imapd that an external layer exists. An SSF (security strength factor) of 1 means an integrity protection layer exists. Any
higher SSF implies some form of privacy protection.
FILES
/etc/imapd.conf
SEE ALSO
imapd.conf(5), cyrmaster(8)
CMU
Project Cyrus IMAPD(8)