Answer the question
In order to leave comments, you need to log in
How to extract only what you need from output in bash?
Hello, Khabrovites.
With Linux I, alas, on "you", but sometimes tasks arise.
So, problem.
There is a command output cat /sys/bus/w1/devices/22-*/w1_slave 2>&1
in the form of two lines
9c 01 4b 46 7f ff 04 10 7a : crc=7a YES
9c 01 4b 46 7f ff 04 10 7a t=25750
Answer the question
In order to leave comments, you need to log in
cat /sys/bus/w1/devices/22-*/w1_slave 2>&1 | awk -F'=' '/t=/ {print $2}'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question