linux - How to grep and output block of string separated by spaces from a single line output -


is there way grep single line of output items separated spaces , output exact block of string begins , ends spaces?

for instances, here output:

ok - server: supermicro super server s/n: 0123456789 system bios: 1.1 2015-04-09|p2vol_0_memory_device_1_vdimmab=1.19;1.34;1.42 p2vol_10_system_board_19_3.3vsb=3.21;3.55;3.65 p2vol_11_system_board_20_1.5v_pch=1.5;1.64;1.67 p2vol_12_system_board_21_1.2v_bmc=1.21;1.34;1.37 p2vol_13_system_board_32_3.3vcc=3.35;3.55;3.65 p2vol_14_system_board_33_5vcc=5;5.38;5.54 p2vol_1_memory_device_2_vdimmcd=1.19;1.34;1.42 p2vol_2_memory_device_3_vdimmef=1.2;1.34;1.42 p2vol_3_memory_device_4_vdimmgh=1.19;1.34;1.42 p2vol_4_processor_3_vcpu1=1.82;1.89;2.08 p2vol_5_processor_4_vcpu2=1.82;1.89;2.08 p2vol_6_system_board_12_1.05v_pch=1.05;1.19;1.22 p2vol_7_system_board_15_5vsb=5.07;5.38;5.54 p2vol_8_system_board_17_12v=12.18;12.94;13.25 p2vol_9_system_board_18_vbat=2.87;3.67;3.78 p4tem_0_memory_device_64_p1-dimma1_temp=45;80;85 p4tem_10_processor_1_cpu1_temp=47;80;85 p4tem_11_processor_2_cpu2_temp=55;80;85 p4tem_12_system_board_1_system_temp=32;80;85 p4tem_13_system_board_2_peripheral_temp=51;80;85 p4tem_14_system_board_3_pch_temp=44;90;95 p4tem_1_memory_device_68_p1-dimmb1_temp=44;80;85 p4tem_2_memory_device_80_p2-dimme1_temp=47;80;85 p4tem_3_memory_device_84_p2-dimmf1_temp=45;80;85 p4tem_4_memory_module_1_vcpu1vrm_temp=47;95;100 p4tem_5_memory_module_2_vcpu2vrm_temp=54;95;100 p4tem_6_memory_module_3_vmemabvrm_temp=44;95;100 p4tem_7_memory_module_4_vmemcdvrm_temp=38;95;100 p4tem_8_memory_module_5_vmemefvrm_temp=51;95;100 p4tem_9_memory_module_6_vmemghvrm_temp=49;95;100 p5fan_0_fan_device_1_fan1=2000;25300;25400 p5fan_1_fan_device_3_fan3=2000;25300;25400 p5fan_2_fan_device_5_fan5=3100;25300;25400 p5fan_3_fan_device_7_fana=1900;25300;25400 p5fan_4_fan_device_8_fanb=1800;25300;25400 

i want cpux_temp blocks whole output.

you can use grep also:

grep -po 'cpu[0-9]_temp=[0-9].?' 

Comments

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -