Best Answer: How Do I Create a Log File in Linux Script?
Contents How Do You Create a Log File in Unix Script? to Write Output of Bash Command to Log File, You May Use Right Angle Bracket Symbol (>) or Double Right...
Contents
How do you create a log file in Unix script?
To write output of Bash Command to Log File, you may use right angle bracket symbol (>) or double right angle symbol (>>). Right angle braketsymbol (>) : is used to write output of a bash command to a disk file. If the file is not already present, it creates one with the name specified.
Must Read
How do I create a log file in Linux?
2 Answers. Just cat <log message here> >> custom. log . The >> means add on to the bottom of the file rather than > which would delete the contents of the file and then write the message.