Printf In Bash

[Solved] Printf In Bash | Php - Code Explorer | yomemimo.com
Question : printf @ bash

Answered by : alx-the-master

printf "My brother %s is %d years old.\n" Prakash 21

Source : https://linuxhandbook.com/bash-printf/ | Last Update : Thu, 06 Jan 22

Question : printf in bash

Answered by : hutch-polecat

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,

Source : | Last Update : Wed, 31 Mar 21

Answers related to printf in bash

Code Explorer Popular Question For Php