Nope. Ultimately I am trying to print file1 to a new file with an additional column (VLAN Name), and the matching vlans have the name field appended to the end of the row. If a match is not made, then NA or a blank space is fine. This awk command appended the "vlan name" to the first line but did not return any of the fields
Last edited by Scrutinizer; 09-18-2018 at 11:42 PM..
Reason: code tags
Gurus,
I have one file which is having multiple columns and also this file is not always contain the exact columns; sometimes it contains 5 columns or 12 columns. Now, I need to find the difference from that particular file. Here is the sample file:
param1 | 10 | 20 | 30 |
param2 | 10 |... (6 Replies)
pls help
Input:
file1
word1
text1
word2
text2
word3
text3
file2
word1
text11
word3
text13
can u pls help in getting the same
output:
file1 text1 text2 text3 (1 Reply)
Hi guys,
I'm rather new at using UNIX based systems, and when it comes to scripting etc I'm even newer.
I have two files which i need to compare.
file1: (some random ID's)
451245
451288
136588
784522
file2: (random ID's + e-mail assigned to ID)
123888 xc@xc.com
451245 ... (21 Replies)
Dear Gurus,
I am very new to UNIX. I appreciate your help to manage my files.
I have 16 files with equal number of columns in it. Each file has 9 columns separated by space. I need to compare the values in the second column of first file and obtain the corresponding value in the 9th column... (12 Replies)
I have two text files where the first three columns are exactly the same. I want to compare the fourth column of the text files and if the values are different, print that row into a new output file. How do I go about doing that?
File 1:
100 rs3794811 0.01 0.3434
100 rs8066551 0.01... (8 Replies)
Hi,
I have two text files with matching first columns. Some of the values in the second column do not match. I want to write a script to print out the rows (only the first column) where the values in the second column do not match.
Example:
Input 1
A 1
B 2
C 3
D 4
Input 2
A 2
B 2... (6 Replies)
Hi , I want to compare first 3 columns of File A and File B and create a new file File C which will have all rows from File B and will include rows that are present in File A and not in File B based on First 3 column comparison.
Thanks in advance for your help.
File A
A,B,C,45,46... (2 Replies)
Hi all, I'm trying to match the following two files with the code below:
awk -F, 'NR==FNR {a=$0; next} ($12,$4) in a {print $12,$1,a}' OFS="," file4.csv file3.csv
but the code does not print the entire row from file4 in addition to column 12 and 1 of file3.
file4:
o,c,q,co,ov,b... (1 Reply)
Hi,
i have 2 files , the data i need to match is in masterfile and i need to pull out column 3 from master if column 1 and 2 match and output entire row to new file
I have tried with join and awk and i keep getting blank outputs or same file
is there an easier way than what i am... (4 Replies)
Discussion started by: axis88
4 Replies
LEARN ABOUT PLAN9
vlan
VLAN manipulation action in tc(8) Linux VLAN manipulation action in tc(8)NAME
vlan - vlan manipulation module
SYNOPSIS
tc ... action vlan { pop | PUSH | MODIFY } [ CONTROL ]
PUSH := push [ protocol VLANPROTO ] [ priority VLANPRIO ] id VLANID
MODIFY := modify [ protocol VLANPROTO ] [ priority VLANPRIO ] id VLANID
CONTROL := { reclassify | pipe | drop | continue | pass | goto chain CHAIN_INDEX }
DESCRIPTION
The vlan action allows to perform 802.1Q en- or decapsulation on a packet, reflected by the operation modes POP, PUSH and MODIFY. The POP
mode is simple, as no further information is required to just drop the outer-most VLAN encapsulation. The PUSH and MODIFY modes require at
least a VLANID and allow to optionally choose the VLANPROTO to use.
OPTIONS
pop Decapsulation mode, no further arguments allowed.
push Encapsulation mode. Requires at least id option.
modify Replace mode. Existing 802.1Q tag is replaced. Requires at least id option.
id VLANID
Specify the VLAN ID to encapsulate into. VLANID is an unsigned 16bit integer, the format is detected automatically (e.g. prefix
with '0x' for hexadecimal interpretation, etc.).
protocol VLANPROTO
Choose the VLAN protocol to use. At the time of writing, the kernel accepts only 802.1Q or 802.1ad.
priority VLANPRIO
Choose the VLAN priority to use. Decimal number in range of 0-7.
CONTROL
How to continue after executing this action.
reclassify
Restarts classification by jumping back to the first filter attached to this action's parent.
pipe Continue with the next action, this is the default.
drop Packet will be dropped without running further actions.
continue
Continue classification with next filter in line.
pass Return to calling qdisc for packet processing. This ends the classification process.
EXAMPLES
The following example encapsulates incoming ICMP packets on eth0 from 10.0.0.2 into VLAN ID 123:
#tc qdisc add dev eth0 handle ffff: ingress
#tc filter add dev eth0 parent ffff: pref 11 protocol ip
u32 match ip protocol 1 0xff flowid 1:1
u32 match ip src 10.0.0.2 flowid 1:1
action vlan push id 123
Here is an example of the pop function: Incoming VLAN packets on eth0 are decapsulated and the classification process then restarted for
the plain packet:
#tc qdisc add dev eth0 handle ffff: ingress
#tc filter add dev $ETH parent ffff: pref 1 protocol 802.1Q
u32 match u32 0 0 flowid 1:1
action vlan pop reclassify
SEE ALSO tc(8)iproute2 12 Jan 2015 VLAN manipulation action in tc(8)