printf bash script code example
Example: printf in bash
printf "$your_var1 $your_var2 $(tail -n -1 your.log | grep Word_to_grep ) \n" >> ../opt_done.txt
# several things,
# printf with \n new line
# $(tail -n -1 your.log | grep Word_to_grep ) --> is a command, will output whats comes in terminal
(if final line of the document has "Normal" to grep it will grep, oherwise nothing
# $your_var1 $your_var2 variables
# >> this is an appending,