#!/bin/bash getconfig() { echo "PCI Devices," lspci | sed s/" "/','/1 #显示系统中所有PCI总线设备或连接到该总线上的所有设备的工具 echo "CPU Specification," lscpu | sed s/":"/','/1 | tr -d ' ' } getconfig > pci.csv
[lixn@Fedora24 bash_learn]$ oocalc pci.csv
#!/bin/bash getconfig() { echo "PCI Devices," lspci | sed s/" "/','/1 #显示系统中所有PCI总线设备或连接到该总线上的所有设备的工具 echo "CPU Specification," lscpu | sed s/":"/','/1 | tr -d ' ' } getconfig > pci.csv
[lixn@Fedora24 bash_learn]$ oocalc pci.csv