Hi guys,
I am not very experienced in writing ksh scripts and I am trying to write a piece of code that indicates if a given string contains only digits and no alphabet (upper or lower case). If i write it my way it would turn out to have a lot of comparisons.. :eek:
Thanks a lot in... (3 Replies)
How could I check if a string variable contains at least (or only) 2 characters, and check and make sure that the string does not contain any numeric digits?...I need to know how to do this as simple as possible. and I am using the Ksh shell. Thanks. (1 Reply)
i want to parse a string and only display the digits in that string... How would i accomplish this with sed command.
For example.
input string: " 033434343 dafasdf"
output string: 03343434
Thanks (2 Replies)
Hi all,
i have such string stored in a variable
var1 = 00000120
i want the o/p
var1 = 120
is it possible to have such o/p in ksh/bash ...
thanx in advance for the help
sonu (3 Replies)
I would like to search between two a string. I thought this would be easy. The is always at the beginning of a line.
The code:
gawk '/^/{d=$1},/searchstring/,/^(d+1)/'
or
gawk '/^/,/searchstring/,/^/'
did not return the desired result.
inputfile.txt
999 some text searchstring some... (6 Replies)
Hello all! I've looked all over the internet and this site and have come up a loss with an easy way to make a bash script to do what I want to do. I have a file with a naming convention as follows:
2012-01-18 string of words here 123.jpg
2012-01-18 string of words here 1234.jpg
2012-01-18... (2 Replies)
Using these strings as an example:
<a onclick="doShowCHys=1;ShowWindowN(0,'/daman/man.php?asv4=145148&playTogether=True',960,540,943437);return false;" title="">
<a onclick="doShowCHys=1;ShowWindowN(0,'/daman/man.php?asv4=1451486&playTogether=True',960,540,94343);return false;" title="">
<a... (12 Replies)
Trying to find out how to discover if the first 2 characters of a string are "22"
Not sure how.
I could use
if ]; then echo "yes";fi
But I think that will only grab the pattern 22 and not the first 2 digits. (5 Replies)
Hello,
I have a log file with logs such as
01/05/2017 10:23:41 : file.log.38: database error, MODE=SINGLE, LEVEL=critical, STATE: 01170255 (mode main
how can i use perl to extract the 8-digit number below from the string
01170255
Thanks (7 Replies)
Discussion started by: james2009
7 Replies
LEARN ABOUT NETBSD
pvctxctl
PVCTXCTL(8) BSD System Manager's Manual PVCTXCTL(8)NAME
pvctxctl -- display or control ATM PVC transmitter parameters
SYNOPSIS
pvctxctl interface [[vpi:]vci]
pvctxctl interface [vpi:]vci [-n] [-b max-bandwidth] [-j [vpi:]vci] [-p pcr]
DESCRIPTION
pvctxctl displays or controls the shaper parameters of an ATM VC. When a shaper value is specified, pvctxctl sets a shaper to an ATM VC.
pvctxctl works for a PVC sub interface pvc(4) as well as a real ATM interface en(4).
For a real ATM interface, the specified VC should be assigned beforehand by route(8).
For a sub interface, pvctxctl assigns the specified VC to the sub interface. If another VC is already assigned to the sub interface, the old
VC is invalidated.
Availability of shapers, the number of hardware shaper channels, and accuracy of shaping are all device dependent. For example, ENI Midway
chip has 8 shaper channels but the driver reserves one for non-shaping VCs.
The options are as follows:
interface The interface parameter is a string of the form ``name unit'', for example, ``en0''.
[vpi:]vci The VC number to which the shaper is assigned. When the VPI number is omitted, VPI number 0 is assumed. For example, to assign
a shaper to VPI=0 and VCI=201, the following forms can be used: "201", "0xc9", "0:201", "0:0xc9".
-b max-bandwidth
The PCR parameter can be specified also in ``bits per second''. The rate is the rate of AAL5 frame and the PCR is calculated by
the following form:
PCR = max-bandwidth / 8 / 48
``K'' and ``M'' can be used as a short hand of ``000'' and ``000000'' respectively. For example, ``45M'' means ``45Mbps'' or PCR
value ``117187''.
-j [vpi:]vci
The join parameter is intended for VP shaping. The VC shaper channel is shared with the existing VC, which means the sum of the
cell rates never exceeds the maximum PCR among the shared VCs. On the other hand, when the shaper channel is not shared, the sum
of the cell rates could be the sum of the PCRs.
For example, if two VCs (say 201 and 202) share a 45Mbps VP, use:
# pvctxctl en0 201 -b 45M
# pvctxctl en0 202 -b 45M -j 201
-n This parameter is only for a sub interface. Use NULL encapsulation instead of LLC/SNAP.
-p pcr The PCR (Peak Cell Rate) parameter specifies the peak cell rate in "cells per second". If PCR value "0" is specified, no shaper
is assigned, which means cells are sent at full-speed of the link. If PCR value ``-1'' is specified, the corresponding VC is
invalidated.
SEE ALSO en(4), ifconfig(8), pvcsif(8), route(8)BUGS
A real ATM interface and a sub interface require different sequences to set a shaper. For example, to assign a 45Mbps shaper to VC 201
(0xc9) of en0:
# ifconfig en0 10.0.0.1
# route add -iface 10.0.0.2 -link en0:3.0.0.c9
# pvctxctl en0 0xc9 -b 45M
For a shadow interface,
# pvcsif en0 # creates pvc0
# ifconfig pvc0 10.0.0.1 10.0.0.2
# pvctxctl pvc0 201 -b 45M
BSD December 29, 1997 BSD