Tôi muốn xóa dấu ngoặc kép (dấu ngoặc kép) xuất hiện trong đầu ra awk, làm thế nào để đạt được
# systool -c fc_host -v | awk '/Class Device =/{host=$4}/port_state/{print host,$3}' (This is my awk output sorted)
"host1" "Online"
"host2" "Online"
Dưới đây là đầu ra lệnh & lệnh ..
# systool -c fc_host -v
Class Device = "host1"
Class Device path = "/sys/class/fc_host/host1"
active_fc4s = "0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 "
fabric_name = "0x100000051ee8aecf"
issue_lip = <store method only>
maxframe_size = "2048 bytes"
node_name = "0x20000000c98f62a7"
port_id = "0x652500"
port_name = "0x10000000c98f62a7"
port_state = "Online"
port_type = "NPort (fabric via point-to-point)"
speed = "8 Gbit"
supported_classes = "Class 3"
supported_fc4s = "0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 "
supported_speeds = "2 Gbit, 4 Gbit, 8 Gbit"
tgtid_bind_type = "wwpn (World Wide Port Name)"
uevent = <store method only>
Device = "host1"
Device path = "/sys/devices/pci0000:00/0000:00:07.0/0000:0e:00.0/host1"
uevent = <store method only>