I am having trouble parsing rpm filenames in a shell script.. I found a snippet of perl code that will perform the task but I really don't have time to rewrite the entire script in perl. I cannot for the life of me convert this code into something sed-friendly:
if ($rpm =~ /(*)-(*)-(*)\.(.*)/)... (1 Reply)
Hi,
Please help me to understand the bold segments in the below regex.
Both are of same type whose meaning I am looking for.
find . \( -iregex './\{6,10\}./src' \) -type d -maxdepth 2
Output:
./20111210.0/src
In continuation to above:
sed -e 's|./\(*.\{1,3\}\).*|\1|g'
Output: ... (4 Replies)
I have a file of protein sequences with headers (my source file). Based on a list of IDs (which are included in some of the headers), I'd like to print out only the specified sequences, with only the ID as header.
In other words, I'd like to search source.txt for the terms in IDs.txt, and print... (3 Replies)
I have the following line of code that works wonders. I just don't completely understand it as I am just starting to learn regex. Can you help me understand exactly what is happening here?
find . -type f | grep -v '^\.$' | sed 's!\.\/!!' (4 Replies)
# echo "Teest string" | sed 's/e*/=>replaced=</'
=>replaced<=Teest string
So, in the above code , sed replaces at the start. does that mean sed using the pattern e* settles to zero occurence ? Why sed was not able to replace Teest string.
# echo "Teest string" | sed 's/e*//g'
Tst string
... (6 Replies)
Hi Guys,
Could you please kindly explain what exactly the below SED command will do ?
I am quite confused and i assumed that,
sed 's/*$/ /'
1. It will remove tab and extra spaces .. with single space.
The issue is if it is removing tab then it should be Î right ..
please assist.... (3 Replies)
I am not a big expert in regex and have just little understanding of that language.
Could you help me to understand the regular Perl expression:
^(?!if\b|else\b|while\b|)(?:+?\s+){1,6}(+\s*)\(*\) *?(?:^*;?+){0,10}\{
------
This is regex to select functions from a C/C++ source and defined in... (2 Replies)
I'm trying to get some exclusions into our sendmail regular expression for the K command. The following configuration & regex works:
LOCAL_CONFIG
#
Kcheckaddress regex -a@MATCH
+<@+?\.++?\.(us|info|to|br|bid|cn|ru)
LOCAL_RULESETS
SLocal_check_mail
# check address against various regex... (0 Replies)
Hi,
I need some guidance with understanding this Perl script below. I am not the author of the script and the author has not leave any documentation. I supposed it is meant to be 'easy' if you're a Perl or regex guru. I am having problem understanding what regex to use :confused: The script does... (3 Replies)
Hello All,
While googling on regex I came across a site named Regulex Regulex:JavaScript Regular Expression Visualizer
I have written a simple regex ^(a|b|c)(*)@(.*) and could see its visualization; one could export it too, following is the screen shot.
... (3 Replies)
Discussion started by: RavinderSingh13
3 Replies
LEARN ABOUT CENTOS
tc-pfifo
PBFIFO(8) Linux PBFIFO(8)NAME
pfifo - Packet limited First In, First Out queue
bfifo - Byte limited First In, First Out queue
SYNOPSIS
tc qdisc ... add pfifo [ limit packets ]
tc qdisc ... add bfifo [ limit bytes ]
DESCRIPTION
The pfifo and bfifo qdiscs are unadorned First In, First Out queues. They are the simplest queues possible and therefore have no overhead.
pfifo constrains the queue size as measured in packets. bfifo does so as measured in bytes.
Like all non-default qdiscs, they maintain statistics. This might be a reason to prefer pfifo or bfifo over the default.
ALGORITHM
A list of packets is maintained, when a packet is enqueued it gets inserted at the tail of a list. When a packet needs to be sent out to
the network, it is taken from the head of the list.
If the list is too long, no further packets are allowed on. This is called 'tail drop'.
PARAMETERS
limit Maximum queue size. Specified in bytes for bfifo, in packets for pfifo. For pfifo, defaults to the interface txqueuelen, as speci-
fied with ifconfig(8) or ip(8). The range for this parameter is [0, UINT32_MAX].
For bfifo, it defaults to the txqueuelen multiplied by the interface MTU. The range for this parameter is [0, UINT32_MAX] bytes.
Note: The link layer header was considered when counting packets length.
OUTPUT
The output of tc -s qdisc ls contains the limit, either in packets or in bytes, and the number of bytes and packets actually sent. An
unsent and dropped packet only appears between braces and is not counted as 'Sent'.
In this example, the queue length is 100 packets, 45894 bytes were sent over 681 packets. No packets were dropped, and as the pfifo queue
does not slow down packets, there were also no overlimits:
# tc -s qdisc ls dev eth0
qdisc pfifo 8001: dev eth0 limit 100p
Sent 45894 bytes 681 pkts (dropped 0, overlimits 0)
If a backlog occurs, this is displayed as well.
SEE ALSO tc(8)AUTHORS
Alexey N. Kuznetsov, <kuznet@ms2.inr.ac.ru>
This manpage maintained by bert hubert <ahu@ds9a.nl>
iproute2 10 January 2002 PBFIFO(8)