for LU in $(< LU-list-Final)
do
OUT=$(grep -B1 $LU cibc-src-ip.cap |egrep 'IP 16|IP 19|IP 15' |awk -F">" '{print $1}')
if [ "$OUT" != "" ]; then
echo " LU $LU was accessed by ===============> $OUT "
echo ""
fi
done
The current output snippet looks like this:
Code:
LU CDC17175 was accessed by ===============> 2014-05-20 10:03:47.637360 IP 167.26.211.16.nimrod-agent
LU CDC18089 was accessed by ===============> 2014-05-20 09:54:27.837523 IP 167.26.68.215.4488
2014-05-20 09:55:35.052801 IP 167.26.68.215.ipsec-nat-t
2014-05-20 10:05:24.791162 IP 167.26.68.215.netuitive
LU cdc18111 was accessed by ===============> 2014-05-20 09:56:16.427882 IP 167.26.82.53.4755
I would like it so that when there are multiple lines for a LU string, they all line up like:
Code:
LU CDC17175 was accessed by ===============> 2014-05-20 10:03:47.637360 IP 167.26.211.16.nimrod-agent
LU CDC18089 was accessed by ===============> 2014-05-20 09:54:27.837523 IP 167.26.68.215.4488
2014-05-20 09:55:35.052801 IP 167.26.68.215.ipsec-nat-t
2014-05-20 10:05:24.791162 IP 167.26.68.215.netuitive
LU cdc18111 was accessed by ===============> 2014-05-20 09:56:16.427882 IP 167.26.82.53.4755
Thnx for any suggestion
---------- Post updated at 10:43 AM ---------- Previous update was at 10:42 AM ----------
Hi guys,
It will be a great help if somebody can help me in following problem.
I have tried hard but because of lack of UNIX/LINUX knowledge I am not able to do it.
I have written a script that returns 3 things of all the employees in my organisation. i.e. Name, Login time & log out time of... (2 Replies)
I would like to keep the complete lines in the output, but my script adds carriage returns for each space (e.g. keep BRITISH AIRWAYS on one line in the output):
File1=
BAW
BRITISH AIRWAYS
RYR
RYAN AIR
for i in $(cat File1)
do
echo $i
done
Output:
BAW
BRITISH
AIRWAYS
RYR... (4 Replies)
I have input file in this way
John 1234 BASIC 26000
John 1234 ALLOWC 01550
John 1234 INCER 01700
John 1234 REL 20000
Debi 2345 BASIC 29000
Debi 2345 ALLOWC 01600
Debi 2345 INCR 01900
Debi 2345 REL ... (8 Replies)
Hi Experts,
I have to create a report for certain audit and my output looks as follows
I m trying to format my output to look like
Any inputs would be highly appreciated
Thanks
Syed (5 Replies)
Hi Guys..
Need your help to format the output of my shell script.
I am using spool command to take out put in csv file.
below is my code. (for example)
col USERNAME for a15
col EMAIL for a30
col FULL_NAME for a20
col LAST_LOGIN for a40
col DATE_CREATED for a40
SPOOL 120.csv... (3 Replies)
Hi,
I have a file which contents entries in this form.
Only in /data4/temp abc.000001
Only in /data4/temp abc.000003
Only in /data4/temp abc.000012
Only in /data4/temp abc.000120
Only in /data4/temp abc.000133
Only in /data4/temp abc.001444
i want to read line by line and format... (2 Replies)
Graphics::Primitive::Insets(3pm) User Contributed Perl Documentation Graphics::Primitive::Insets(3pm)NAME
Graphics::Primitive::Insets - Space between things
DESCRIPTION
Graphics::Primitive::Insets represents the amount of space that surrounds something. This object can be used to represent either padding
or margins (in the CSS sense, one being inside the bounding box, the other being outside)
SYNOPSIS
use Graphics::Primitive::Insets;
my $insets = Graphics::Primitive::Insets->new({
top => 5,
bottom => 5,
left => 5,
right => 5
});
METHODS
Constructor
new Creates a new Graphics::Primitive::Insets.
Instance Methods
as_array
Return these insets as an array in the form of top, right, bottom and left.
bottom
Set/Get the inset from the bottom.
equal_to
Determine if these Insets are equal to another.
left
Set/Get the inset from the left.
right
Set/Get the inset from the right.
top Set/Get the inset from the top.
zero
Sets all the insets (top, left, bottom, right) to 0.
AUTHOR
Cory Watson, "<gphat@cpan.org>"
SEE ALSO perl(1)COPYRIGHT & LICENSE
Copyright 2008-2010 by Cory G Watson.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.12.3 2010-08-21 Graphics::Primitive::Insets(3pm)