linux - Find certain line in file and extract part of it -


i trying make bash script in file line (ir freq. = 23.23) , copy 23.23 , send through serial interface (ttys0).

the line move around file , number change lot!

you can use below script

grep -r "ir freq." filename | cut -d '=' -f 2 | sed -e 's/^[[:space:]]*//'


Comments

Popular posts from this blog

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

apache - How do I stop my index.php being run twice for every user -