Awesome answer. I knew 'awk' can solve this problem. To filter 1 file, java took 27 minutes and shell took 12 seconds :-)
I added a filter of length of both the first fields and my final answer is:
Thanks a lot.
---------- Post updated at 01:41 AM ---------- Previous update was at 01:24 AM ----------
I just ran the awk for a bigger file and it took 154 seconds to get the results.
Thanks to @guruprasadpr..
I am sure Java would have taken hours to do this.
Hi guys, I hope you can help me with my problem.
I have a text file that contains lines like this:
78 ANGELO -809.05
79 ANGELO2 -5,000.06
I need to find all occurences of amounts that are negative and replace them with x's
78 ANGELO xxxxxxx
79... (4 Replies)
Hello,
i have a program where i have to get a character from the user and check it against the word i have and then replace the character in a blank at the same position it is in the word. (7 Replies)
I have a requirement of shell script where i need to read the File name i.e ls -t | head -1 and Match that Filename with some delimited values which are in a separate File.
For Example i am reading the File name i.e (ls -t | head -1) after that i need to read one more sequential file which... (2 Replies)
I have a string like ab or abc of whatever length. But i want to know whether another string ( for example, abcfghijkl, OR a<space> bcfghijkl ab<space> cfghijkl OR a<space>bcfghijkl OR ab<space> c<space> fghijkl ) starts with ab or abc... space might existing on the longer string... If so, i... (4 Replies)
Hi,
i want to know how to compare string of file with input string
im trying following code:
file_no=`paste -s -d "||||\n" a.txt | cut -c 1`
#it will return collection number from file
echo "enter number"
read " curr_no"
if ; then
echo " current number already present"
fi
... (4 Replies)
here is what i want to achieve... consider a file contains below contents. the file size is large about 60mb
cat dump.sql
INSERT INTO `table1` (`id`, `action`, `date`, `descrip`, `lastModified`) VALUES (1,'Change','2011-05-05 00:00:00','Account Updated','2012-02-10... (10 Replies)
Hello, I want pick up rows from input with conditions:
1) col2 is 2 replicate of col1 joint with "/"
2) col3 is a joint string as replicate of each side of the "/" symbol
3) col2 not equal to col3
input:
TG TG/TG TG/TGG
C C/C C/CG
C C/G CA/CA
C C/C CA/CA
AG AG/AG... (3 Replies)
Using the awk below I am able to combine all the matching dates in $1, but I can not seem to remove the non-matching from the file. Thank you :).
file
20161109104500.0+0000,x,5631
20161109104500.0+0000,y,2
20161109104500.0+0000,z,2
20161109104500.0+0000,a,4117... (3 Replies)
In the awk below I am trying to get the average of the sum of $7 if the string in $4 matches in the line below it. The --- in the desired out is not needed, it is just to illustrate the calculation. The awk executes and produces the current out. I am not sure why the middle line is skipped and the... (2 Replies)
Discussion started by: cmccabe
2 Replies
LEARN ABOUT OPENSOLARIS
tc-tcindex
Traffic control index filter(8) Linux Traffic control index filter(8)NAME
tcindex - traffic control index filter
SYNOPSIS
tc filter ... tcindex [ hash SIZE ] [ mask MASK ] [ shift SHIFT ] [ pass_on | fall_through ] [ classid CLASSID ] [ action ACTION_SPEC ]
DESCRIPTION
This filter allows to match packets based on their tcindex field value, i.e. the combination of the DSCP and ECN fields as present in IPv4
and IPv6 headers.
OPTIONS
action ACTION_SPEC
Apply an action from the generic actions framework on matching packets.
classid CLASSID
Push matching packets into the class identified by CLASSID.
hash SIZE
Hash table size in entries to use. Defaults to 64.
mask MASK
An optional bitmask to binary AND to the packet's tcindex field before use.
shift SHIFT
The number of bits to right-shift a packet's tcindex value before use. If a mask has been set, masking is done before shifting.
pass_on
If this flag is set, failure to find a class for the resulting ID will make the filter fail and lead to the next filter being con-
sulted.
fall_through
This is the opposite of pass_on and the default. The filter will classify the packet even if there is no class present for the
resulting class ID.
SEE ALSO tc(8)iproute2 21 Oct 2015 Traffic control index filter(8)