Skip the delimiter with in double quotes and count the number of delimiters during data extract
Hi All,
I'm stuck-up in finding a way to skip the delimiter which come within double quotes using awk or any other better option. can someone please help me out.
I know this is probably much simplier than I am making but I need some help please. I have a data file that contains a value on the first line between double quotes ("00043"). I need to assign the value between the first set quotes to a variable in my perl script for comparison analysis. Also,... (6 Replies)
I have a list of files with names as "FULL_abcd_xyz_timestamp.txt" and "FULL_xx_abcd_xyz_timestamp.txt". I am writing a script with a 'for loop' to take each file, strip the "FULL" and "timestamp" from the file name and do some actions on the contains of the file. So I need to know the number of... (4 Replies)
Hi,
I'm trying to insert double quotes right after the third delimiter in a file. Delimiter is ^Z.
For example:
Input:
Oct ^Z 1234 ^Z John ^Z Hello!"
Desired Output:
Oct ^Z 1234 ^Z John ^Z "Hello!"
Any ideas? (1 Reply)
Hi,
my requirement is to find the count of commas in a string excluding the ones in double quotes.
For example:
If the input string is
abc,xyz.com,lmhgdf,"abc, 401 street","tty,stt",45,23,45
The output should be 7 (7 Replies)
Hello everybody!
I am quit new here and hope you can help me.
Using an awk script I am trying to extract data from several files. The structure of the input files is as follows:
TimeStep parameter1 parameter2 parameter3 parameter4
e.g.
1 X Y Z L
1 D H Z I
1 H Y E W
2 D H G F
2 R... (2 Replies)
Need a little help.
I have just a simple string with a lot double quotes in it. I need to be able to parse through this string, and know how many double quotes I have, and where I am, so I can key off every 9th double quote. For example (coding is not complete):
#!/bin/bash
count=0... (3 Replies)
I would like to know how to replace a space delimiter with a ^_ (\037) delimiter and a double quote delimiter while maintaining the spaces inside the double quotes. The double quote delimiter is only used on text fields.
I'd prefer a one-liner, but could handle a function or script that accepts... (4 Replies)
i want extract where the 2nd column having "3" or "7".
Based on the forums tried like this but it is not working
awk -F"," '$2=3;$2=7 {print}' filename
Source
"1","2","3","4"
"1","3","3","4"
"1","7","3","4"
"1","8","3","4"
"1","2","3","4"
"1","2","3","4"
Output :
... (5 Replies)
What to know the way to count the number of delimiters in each record by ignoring the escape delimiters.
Sample Data:
12345678|ABN\|XYZ MED CHEM PTY. LTD.|C||100.00|22|AB"C\|Corp|"XYZ|CDEF"|
I'm using awk -F'|' '{ print NF-1 }' command to find the number of delimiters. this command... (8 Replies)
Hi All,
I have my data like below
"1","abc,db","hac,aron","4","5"
Now I need to extract 1,2,4th columns
Output should be like
"1",abc,db","4"
Am trying to use cut command but not able to get the results.
Thanks in advance. (4 Replies)
Discussion started by: weknowd
4 Replies
LEARN ABOUT DEBIAN
lldptool-med
lldptool(8) Linux lldptool(8)NAME
LLDP-MED - Show / manipulate MED TLV configurations
SYNOPSIS
lldptool -t -i ethx -V [ TLV_TYPE ] enableTx
lldptool -T -i ethx -V [ TLV_TYPE ] enableTx = { yes | no }
lldptool -T -i ethx -V LLDP-MED devtype = { class1 | class2 | class3 }
lldptool -t -i ethx -V LLDP-MED devtype
TLV_TYPE : = {LLDP-MED | medCap | medPolicy | medLoc | medPower | medHwRev | medFwRev | medSwRev | medSerNum | medManuf | medModel | medAssetID }
DESCRIPTION
The LLDP-MED extensions support the Link Layer Discovery Protocol for Media Endpoint Devices defined in the ANSI/TIA-1057-2006 document.
Each TLV can be configured as a class1 , class2 or class3 device. Class I devices are the most basic class of Endpoint Device, Class II
devices support media stream capabilities and Class III devices directly support end users of the IP communication system. See ANS-TIA-1057
for clarification of class types.
ARGUMENTS
enableTx
Enables the TLV to be transmitted
devtype
Set or query the class type of the device.
TLV_TYPE
List of supported TLV specifiers applicable to Media Endpoint Devices.
LLDP-MED
apply arguments to all supported MED TLVs.
medCAP LLDP-MED Capabilities TLV
medPolicy
LLDP-MED Network Policy TLV
medLoc LLDP-MED Location TLV
medPower
LLDP-MED Extended Power-via-MDI TLV
medHwRev
LLDP-MED Hardware Revision TLV
medFwRev
LLDP-MED Firmware Revision TLV
medSwRev
LLDP-MED Software Revision TLV
medSerNum
LLDP-MED Serial Number TLV
medManuf
LLDP-MED Manufacturer Name TL
medModel
LLDP-MED Model Name TLV
medAssetID
LLDP-MED Asset ID TLV
EXAMPLE & USAGE
Enable class1 MED device on eth2
lldptool -T -i eth2 -V LLDP-MED enableTx=yes devtype=class1
Query class type of MED on eth2
lldptool -t -i eth2 -V LLDP-MED -c devtype
Query transmit state of medPolicy on device eth2
lldptool -t -i eth2 -V medPolicy -c enableTx
SOURCE
o Link Layer Discovery Protocol for Media Endpoint Devices (http://www.tiaonline.org/standards/technology/voip/documents/ANSI-
TIA-1057_final_for_publication.pdf)
NOTES SEE ALSO lldptool(8), lldpad(8)AUTHOR
John Fastabend
open-lldp June 2011 lldptool(8)