Grep /Awk letters X - X in every line and print it as a mac address
hey
i m kinda new to this so i will appreciate any help
, i have this list of values:
i need to grep only this section "pwwn = 0x50012482009cd7a7" from every line
and then print it as a mac address : 50:01:24:82:00:9c:d7:a7 ( without the "pwwn = 0x")
at first i tried to grep only the 25 first letters , but the file contains llines that are not of the same structure so that failed.
Please advise
thank u all.
I have file one containing Mac Addresses minus colon. I would like to add them to a different file with columns seperated by commas. Such as
File 1
0000aa1122
0000aa1123
0000aa1126
Output File
Name, MacAddress,Date
Something, 0000aa1122,Something
Something, 0000aa1123,Something... (6 Replies)
I'm having problems since few days ago, and i'm not able to make it works with a simple awk+grep script (or other way to do this).
For example, i have a input file1.txt:
cat inputfile1.txt
218299910417
1172051195
1172070231
1172073514
1183135117
1183135118
1183135119
1281440202
... (3 Replies)
Hi,
I have a file like this
>hg19_chr1_123_456_+
asndbansbdahsjdbfsjhfghjdsghjdghjdjhdghjjdkhfsdkjfhdsjkdkjghkjdhgfjkhjfkf
hasjgdhjsgfhjdsgfdsgfjhdgjhdjhdhjdfhjdfjgfdfbdghjbfjksdhfjsfdghjgdhjgfdjhgd
jhgdfj
>hg19_chr1_123_456_-... (5 Replies)
Hi everyone. I need to change a script (ksh) so that it will grep on the 1st 2 letters in the second column of a 5 column file such as this one:
192.168.1.1 CAXY0_123 10ABFL000001 # Comment
192.168.1.2 CAYZ0_123 10ABTX000002 # Comment
192.168.2.1 FLXY0_123 11ABCA000001 ... (4 Replies)
Hi,
mac.txt
My mac address is <Mac Address>.
How can i replace <Mac Address> with the actual of my computer?
I try to GREP command as below but i am unable to grep it to replace just <Mac Address>.
ifconfig eth0 | grep -o -E '(]{1,2}:){5}]{1,2}'
Million in Advance.
Please use... (7 Replies)
Hi to all,
May someone help me with the following.
The awk script below is part of a bigger awk script, and this part attempts to print an Ip address that is in hex format in decimal format. I'm trying with following code but
I'm getting 0.0.0.0 and the correct answer is 192.168.140.100
... (9 Replies)
Hello,
I've been trying to find the answer to this with Google and trying to browse the forums, but I haven't been able to come up with anything. If this has already been answered, please link me to the thread as I can't find it.
I've been asked to write a script that pulls a list of our CPE... (51 Replies)
four interfaces with ifconfig
all interfaces have the same mac. If is not set for unique.
but it still works.
what difference does it make to have all macs the same or different? (4 Replies)
Discussion started by: rrodgers
4 Replies
LEARN ABOUT CENTOS
fcnsq
FCNSQ(8) Open-FCoE Tools FCNSQ(8)NAME
fcnsq - Fibre Channel Name Server Query Tool
SYNOPSIS
fcnsq host --gpn port_id [-q | --quiet]
fcnsq host --gnn port_id [-q | --quiet]
fcnsq host --gspn port_id [-q | --quiet]
fcnsq host --gsnn wwpn [-q | --quiet]
fcnsq ?
DESCRIPTION
The fcnsq command performs Fibre Channel Name Server queries for a user-specified FC Host. The supported name server query commands
include: Get Port Name (GPN), Get Node Name (GNN), Get Symbolic Node Name (GSNN), and Get Symbolic Port Name (GSPN) as described in FC-GS-3
for the Common Transport (CT) services.
fcnsq takes the host bsg name as the input for the target host. Host bsg name must be a valid bsg device, e.g., "host12" as derived from
/dev/bsg/fc_host12. For each name server query command, the argument is either a Port ID or a World Wide Port Name. Port IDs and World Wide
Names must be specified in hexadecimal. To disable verbose output, use the --quiet option.
OPTIONS
host --gpn port_id
Get Port Name by Port ID for host.
host --gnn port_id
Get Node Name by Port ID for host.
host --gspn port_id
Get Symbolic Port Name by Port ID for host.
host --gsnn wwpn
Get Symbolic Node Name by World Wide Port Name for host.
-q, --quiet
Disable verbose output.
?
Display a help message with basic usage instructions.
EXAMPLES
Query Get Port Name (GPN) from host12 for Port ID 0xbf0027
fcnsq host12 --gpn bf0027
Query Get Node Name (GNN) from host12 for Port ID 0xbf0027
fcnsq host12 --gnn bf0027
Query Get Symbolic Port Name (GSPN) from host12 for Port ID 0xbf0027
fcnsq host12 --gspn bf0027
Query Get Symbolic Node Name (GSNN) from host12 for WWWPN 0x1000001B213C9DDA
fcnsq host12 --gsnn 0x1000001B213C9DDA
SEE ALSO fcoeadm(8)SUPPORT
fcnsq is part of the fcoe-utils package, maintained through the Open-FCoE project. Resources for both developers and users can be found at
the Open-FCoE website http://open-fcoe.org/.
Open-FCoE 06/09/2010 FCNSQ(8)