03-29-2011
Advance file parsing...
hi all
i have a file of the format
Time(starting from 0 in asc order) bytes service flags protocols
e.g.
0, 0, 0, 56, 56
1, 524, 3, 6, 75
1, 624, 0, 43, 53
2, 72, 0, 43, 80
3, 26, 3, 6, 56
4, 323, 3, 1459, 75
5, 325, 3, 1459, 53
6, 225, 3, 1436, 57
now here in the window size of 2 seconds(here the time field) the pattern in the last column repeats the sequence 56-75-53 (if u see in the table the duration is 2 seconds e.g 2-0=2 and 5-3=2)
so the output should be like the pattern of the field along with number of times it has been repeated throughout the table(there are around 50000 such records in the file)
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hey all,
I want to go ahead and create a alias for the command /bin/passwd.
But I want to do this so that it will/can detect if the -r option is added to the command as well...Can this be done...
For example if the user enters:
# passwd
--> Alias will issue /bin/passwd -r
# passwd -r... (0 Replies)
Discussion started by: msbutton27
0 Replies
2. Shell Programming and Scripting
Here is my problem..
1. I want to search all those files with file name starting AJ128****
(in all the sub directories also)
2. I want to search for the follwoing type of string
line beging with string - 'AK*any_1_char*any_2_char*510'
3. I need to display list of file names... (2 Replies)
Discussion started by: sainj
2 Replies
3. UNIX for Advanced & Expert Users
Hi to all,
I have one doubt in unix/linux installation. There are two systems in which one is Sparc system having no CD-Rom, No O/S and fresh Hard disk and another system is having windows O/S. Now, can i install unix or linux o/s in the Empty Sparc System by using other system which is... (1 Reply)
Discussion started by: sasidarvarma
1 Replies
4. Shell Programming and Scripting
Hey guys,
I have this file generated by me... i want to create some HTML output from it.
The problem is that i am really confused about how do I go about reading the file.
The file is in the following format:
TID1 Name1 ATime=xx AResult=yyy AExpected=yyy BTime=xx BResult=yyy... (8 Replies)
Discussion started by: umar.shaikh
8 Replies
5. UNIX for Advanced & Expert Users
You have a file called /opt/test/input.txt with the following information:
man_aa_bld_100.410.040_CMD 08/14/2008 23:29:21 08/14/2008 23:31:10 SU 5339491/1
man_aa_bld_100.410.050_CMD 08/14/2008 23:29:21 08/14/2008 23:31:11 SU 5339491/1
man_aa_bld_100.410.060_CMD 08/14/2008 ... (3 Replies)
Discussion started by: jkumsi
3 Replies
6. Solaris
Hi,
Anyone can help me, how to used the advance 2 days?
today is : 20090915
i need to get the date : 20090917 in the OS level
Thanks,
DBM (4 Replies)
Discussion started by: dba_macau
4 Replies
7. Programming
Hi,
I have to find jar file name and its path by passing it containing class file name, jar is a kind of zip.
by using following command I am able to get jar file name by passing class file name.
find -name "*.jar" -exec grep "CLASSNAME" {} \;
find -name "*.jar" -exec grep... (3 Replies)
Discussion started by: niceboykunal123
3 Replies
8. Debian
Hi There
I have a network where im running squid proxy in transparent mode. All sites are blocked by default and the users can only browse sites listed in a file called allowed-sites. I have to block a group of users in department A from accessing 5 sites that the rest of the company can access.... (0 Replies)
Discussion started by: linuxjunkie
0 Replies
9. UNIX for Advanced & Expert Users
Hi guys, I need your help to use advance grep command, In my example below, I have 5 container which has some information on it, and I need to grep specific word "PLMNCode=454F00" which will not only grep the line contains that word, but I need to print the output for the whole container.
Input... (6 Replies)
Discussion started by: hapalon
6 Replies
10. UNIX for Dummies Questions & Answers
Hi,
below 'awk' code was given for my thread 'Help with printing output format from a file ' earlier, however script is not resulting expected output with below file content.
cat test_tes123.dml
record
string("\001") emp_num; /* CHAR(11) NOT NULL*/
date("YYYYMMDD")... (1 Reply)
Discussion started by: AAHinka
1 Replies
LEARN ABOUT DEBIAN
vzlist
vzlist(8) Containers vzlist(8)
NAME
vzlist - show various information about containers
SYNOPSIS
vzlist [-a | -S] [-n] [-H] [-o name[,name...] | -1] [-s [-]name] [-h pattern] [-N pattern] [-d pattern] [CTID [CTID ...]]
vzlist -L | --list
vzlist --help
DESCRIPTION
This utility is used for listing containers and their parameters. By default only running containers are listed. If one or more CTIDs are
specified, only specified containers are displayed.
For the fields that can have many values (e.g. ip), all the values are displayed only for the last (i.e. leftmost) column; otherwise, only
the first value is shown.
OPTIONS
-a, --all
List all containers.
-S, --stopped
List only not running containers (including the ones with status shown as mounted or suspended).
-n, --name
Display container names instead of hostnames.
-H, --no-header
Suppress displaying the header row.
-o, --output field[,field...]
Display only the specified fields (see Standard fields subsection below).
-1 Synonym for -H -octid, i.e. only show container IDs, one per line.
-s, --sort [-]field
Sort by the value of field (possible arguments are the same as for -o). The - before the field name means sorting in the reverse
order.
Output filters
List of CTs can be further filtered using the following options. For patterns one can use the same wildcards as in shell (i.e. *, ?, and
[]). Note: to avoid expansion of wildcards by the shell, one have to escape the pattern by either putting it into single quotes (like
'a*a') or by adding a backslash before the wildcard character (like a*a).
-h, --hostname pattern
List only containers whose hostnames matches the pattern.
-N, --name_filter pattern
List only containers whose names matches the pattern.
-d, --description pattern
List only containers with descriptions matching the pattern.
Possible fields
-L, --list
list all available format specifiers that can be used for both output (-o, --output) and the sorting order (-s, --sort).
For the user beancounter fields, if suffix is not specified, current usage (a.k.a. "held") value is show. One can also use the fol-
lowing suffixes:
.m maxheld
.b barrier
.l limit
.f fail counter
For the disk quota fields, if suffix is not specified, current usage is shown. One can also use the following suffixes:
.s soft limit
.h hard limit
EXAMPLES
vzlist -o ctid,kmemsize,kmemsize.l -s kmemsize
Show CTIDs, kmemsize usage, and kmemsize limit for all running containers, sorted by the kmemsize usage.
EXIT STATUS
Returns 0 upon success.
COPYRIGHT
Copyright (C) 2000-2011, Parallels, Inc. Licensed under GNU GPL.
OpenVZ 4 Jul 2011 vzlist(8)