Sponsored Content
Top Forums Shell Programming and Scripting How to select or make reference to, part of a field Post 302330194 by akshaykr2 on Tuesday 30th of June 2009 12:02:08 PM
Old 06-30-2009
Question How to select or make reference to, part of a field

For a field format such as AAL1001_MD82, how do I select(and use in if statement) only the last four elements( in this case MD82) or the first three elements (in this case AAL)?

For instance, how do I do the following - if first three elements of $x == yyy, then ...
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Moving Part of a field to another field using AWK

Hi there, I have a comma seperated file with nine fields the fields are rerate: "numberTX",field2,field3,field4,field5..... I want to do this to the file reate: "field5TX",field2,field3,field4,field5 I know I can do this using AWK, but the thing giving me fits is that I... (5 Replies)
Discussion started by: rjsha1
5 Replies

2. Shell Programming and Scripting

select last field from a file

hi everybody i would to select the last field of a file here as you can see i select the field number 8 y=`cat sortie2 | grep "^"| grep "starting"| awk '{ print $8}'` but line can containt more or less field in never know, i just know is the last one so i wondering to know if is... (3 Replies)
Discussion started by: kykyboss
3 Replies

3. Shell Programming and Scripting

select a particular field

hi i have a file wwww-qqq.eee ksdklfsdf adm,as.d,am sdsdlasdjl sadsadasda wwww-qqq.eee ksdklfsdf adm,as.d,am sdsdlasdjl sadsadasda wwww-qqq.eee ksdklfsdf adm,as.d,am sdsdlasdjl sadsadasda wwww-qqq.eee ksdklfsdf adm,as.d,am sdsdlasdjl sadsadasda wwww-qqq.eee ksdklfsdf adm,as.d,am... (4 Replies)
Discussion started by: Satyak
4 Replies

4. Shell Programming and Scripting

regex to select last part of a path

Hi all, I am learning the use of regular expression and I would like to know which regex can be used to select only the last part of a directory path name. Something like: /dir1/dir2/dir2 and I want to select the last /dir2 where dir2 can be any kind of string. Thanks a lot for your help.... (7 Replies)
Discussion started by: elric
7 Replies

5. Shell Programming and Scripting

expr Field 1 + Field 2 Since when does 2 positives make a negative

Please help. I am adding 2 fields which are both positive and the result is negative. What am I missing? FileEHash=`expr ${Field1} + ${Field2}` >/dev/null Debug Results + expr 02100002 + 2009701914 EntryHash=2011801916 + expr 02100002 + 2146202044 FileEHash=-2146665250 How do... (2 Replies)
Discussion started by: ski
2 Replies

6. Shell Programming and Scripting

BASH: File name part to list reference problem.

I've made a habit of including a four-letter "tail" on image file names I download from the Web, so I can both match them with IPTC Transmission References of my own making and rename them later using either a GUI renamer or a script I've written myself. Now I want to automate the process of... (2 Replies)
Discussion started by: SilversleevesX
2 Replies

7. Shell Programming and Scripting

Select a specific part of the string and print it

Hi all, I have a string that looks like: #!/bin/sh options="arguments: --user=alpha --group=beta --prefix=/usr/share --proxy-path=/proxy --proxy-tmp=/tmp --conf-path=/etc" My goal is to transform the string into an array, then for each key, if it starts with "--proxy" to print the string... (2 Replies)
Discussion started by: TECK
2 Replies

8. Programming

Select and group by excluding one field

Dear community, I have a very simple query (on Oracle 11g) to select 3 fields: select field1, field2, field3, count(*) from table where... group by field1, field2, field3 having count(*) > 10;Now, what I need, is exclude "field3" from the "group by" since I only need field 1 and 2 to be... (2 Replies)
Discussion started by: Lord Spectre
2 Replies

9. Shell Programming and Scripting

Using awk to select one field

Hi, I saw your post.. I have a dought in awk command... how to get the output from a file. i need a first column in etc/passwd file in a single column (in indivijual line)... i couldn't get with this command cat /etc/passwd | awk -F ":" '{printf $1}' Kindly help This thread was created... (3 Replies)
Discussion started by: Dheepak s
3 Replies

10. UNIX for Beginners Questions & Answers

How to make a loop to read the input from a file part by part?

Hi All, We've a VDI infrastructure in AWS (AWS workspaces) and we're planning to automate the process of provisioning workspaces. Instead of going to GUI console, and launching workspaces by selecting individual users is little time consuming. Thus, I want to create them in bunches from AWS CLI... (6 Replies)
Discussion started by: arun_adm
6 Replies
QOS(7)								   Miscellaneous							    QOS(7)

NAME
qos - Quality of Service specification DESCRIPTION
The text2qos and qos2text functions use the format described in this man page. Because all standard ATM tools on Linux use those functions to convert to or from the textual representation of QOS specifications, they expect them in the same format too. The most fundamental parameters are the traffic class and the AAL (ATM Adaption Layer) type. If the connection is bi-directional, both directions have the same traffic class and the same AAL type. The traffic class and the AAL type are the first elements (in any order) in a QOS specification. The traffic class is the only required element. If the AAL type is omitted, the application will provide a default value. The following traffic classes are recognized: ubr Unassigned Bit Rate cbr Constant Bit Rate abr Available Bit Rate The following AAL types are recognized: aal0 ("raw ATM") aal5 If both, the traffic class and the AAL type are specified, they are separated by a comma. If more parameters are supplied, the traffic class and AAL type must be followed by a colon. Traffic parameters can be specified indepen- dently for the transmit and the receive direction. Their parameter lists are prefixed with tx: and rx:, respectively. If both parameter lists are present, the tx: list must precede the rx: list. If a parameter is equal for both directions, it can be placed in a common param- eter list (without prefix). The general format is as follows: class_and_aal:common_list,tx:list,rx:list Each list consists of elements specifying a parameter. Elements can appear in any order and they are separated with commas. The following elements are recognized: pcr=rate is a synonym for max_pcr=rate max_pcr=rate The upper limit for the peak cell rate to assign. If omitted, any rate up to link speed may be chosen. min_pcr=rate The lower limit for the peak cell rate to assign. If omitted, any rate above zero can be chosen. sdu=size is a synonym for max_sdu=size max_sdu=size The size of the largest packet that may be sent or received. If omitted, a context-dependent default value is used. Values are specified as follows: rate The (decimal) rate, optionally followed by a unit. The unit may be prefixed with one of the multipliers k, M, or G, meaning 1'000, 1'000'000, or 1'000'000'000, respectively. The units cps (cells per second) and bps (bits per second) are recognized. If multiplier and unit are omitted, cells per second are assumed. Note that the rate is always converted to cells per second, so rounding errors may occur when specifying the rate in bits per second. Rates measured in bits per second are considered to be user data rates, i.e. one cell corresponds to 384 bits. The rate can be a fractional value, e.g. 1.3Mbps. It is an error to specify only a multiplier without a unit. Link speed can be indicated by using the keyword max as the rate. size The (decimal) number of bytes. The tx: or rx: lists may also just contain the single element none, which indicates that the corresponding direction is not used. It is an error to specify none for both direction. Note that commas must never follow colons or other commas. Also, whitespace is not allowed inside a QOS specification. QOS specifications are case-insensitive. EXAMPLES
Each of the following lines contains a valid QOS specification: ubr ubr:pcr=100kbps cbr,aal0:pcr=64kbps CBR:max_pcr=11Mbps,min_pcr=10mbps,sdu=8192 aal5,ubr:tx:none cbr:tx:pcr=30000,rx:none The following specificiations are equivalent: CBR,AAL5:PCR=48Mbps cbr,aal5:max_pcr=125000 cbr,aal5:tx:pcr=125kcps,rx:pcr=125kcps AUTHOR
Werner Almesberger, EPFL LRC/ICA <werner.almesberger@epfl.ch> Linux April 20, 2000 QOS(7)
All times are GMT -4. The time now is 02:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy