Dear members,
I have a text file with several lines of output as below.
Each header line has HEADER number and word PRINT.
I will need to grep the first word in the line with the keyword PRINT i.e HEADER1, HEADER2 and basically prefix as column1 in each line underneath. Should do this until...
Hi,
I would like to take a file, grep blocks of lines between spaces and spool them to a different file . Suppose that the file name is a.txt, I'd like to create a1.txt, a2.txt depending on the number of text blocks between spaces. Will appreciate if anyone can suggest me how to do this...
Hi.
Thanks for the reply. What I have just discovered is that, no matter how many updates are made on any field, the last row (for the current date and for an employee) should be the one with latest old values. So, that row should be compared with the row from Employee table (on a particular...
Hi,
Yes there is a timestamp (currentdate as TIMESTAMP) in every record. That determines which one is the last row for a particular employee id and for the currentdate. The last row has the latest old values of all fields. But we also need to see that we are querying for changes that are done...
Hi.
Thanks for the reply. Yes you are right. There needs to be a sequence number. What I have just discovered is that, no matter how many updates are made on any field, the last row (for the current date and for an employee) should be the one with latest old values. So, that row should be...
Hello All,
I have two tables each with 100 fields in it. The first table is Employee and the second is Employee_Journal.
Whenever a change is made to a field in employee table, the field value is updated. A corresponding record is entered in the journal table. The journal table is like a...
Hello All,
I have two tables each with 100 fields in it. The first table is Employee and the second is Employee_Journal.
Whenever a change is made to a field in employee table, the field value is updated. A corresponding record is entered in the journal table. The journal table is like a...
Hello All,
I have two tables each with 100 fields in it. The first table is Employee and the second is Employee_Journal.
Whenever a change is made to a field in employee table, the field value is updated. A corresponding record is entered in the journal table. The journal table is like a...
Hello all
I have created two tables with the following format.
Table 1
StudentId InstructorId
1000 2000
1001 2000
1002 2001
1003 2001
.... ....
Table 2
StudentId MathMarks PhysicsMarks
1000 90 80
1001 85 75
.... ...
Hello!!
I am relatively new to shell scripting.
I have a cgi which is a shell script: proj_web_apps.cgi
#!/usr/bin/ksh
. ../config/PROJ_ENV
# Limit the CPU time allowed for the process
ulimit -t $ULIMIT_CPU > /dev/null
$AWA_/bin/proj_web_apps
I would like to monitor who invoke this cgi and...
Hello!!
I have a cgi which is a shell script: proj_web_apps.cgi
#!/usr/bin/ksh
. ../config/PROJ_ENV
# Limit the CPU time allowed for the process
ulimit -t $ULIMIT_CPU > /dev/null
$AWA_/bin/proj_web_apps
I would like to monitor who invoke this cgi and at what time. The user name and the ip...
Hello:
Thanks for the reply. This time I am getting this message (with " and '. I tried both).
Can't use an undefined value as filehandle reference at parse.pl line 2.
I appreciate if you can look into this,
Thanks in anticipation.
...{
if($_=~/\bLOG(IN|OUT)_MSG\b/) {
my $msg = $1;
$_ = <FILE>; #go to next line for ip
my($ip) = /AAD\@(.*)/; #retrieve the ip
# if login, store the ip as key and count
$iploggedin{$ip}++ if($msg eq 'IN');
# if logout...
Hello All!
I am very new to perl.
I want to write a script that reads a log file and outputs the result
A snippet of log file is as shown below. 333.333.333.333 is the ip address. ip addresses are always preceded by the word AAD@.
----------------------------------------
10:54:11...
Hello again!!
It now outputs this with a file that is big.
currently from ip->[]
currently from ip->[]
currently from ip->[]
Could this be changed? As I said We need to track LOGIN_MSG and LOGOUT_MSG. Again the file would look like this:
----------------------------------------
10:54:11...
vgersh99:
It gave me the following output.
currently logged with id->[[crelay_child-2818-0]:] from ip->[]
currently logged with id->[[crelay_child-40056-0]:] from ip->[]
currently logged with id->[[crelay_child-26910-0]:] from ip->[]
currently logged with id->[[crelay_child-29826-0]:] from...
Hello vgersh99:
The distinct logins are nothing but distinct ip addresses as each ip address represents a distinct user.
So in AAD@333.333.333.33, the ip address represents a distinct user. And there is the message line (with LOGIN_MSG, or LOGOUT_MSG) on top of it.
Thanks again.
Hello all!!
Can we write a shell script that monitors an executable and counts how many times it is invoked? The script should output the current number of invocations and also how many times it has been invoked so far.
Thanks!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.