I understand eveything except the part starting from “>> #{puma_log} 2>&1 &” in the above command.
I have seen ‘>>’ in many places where it basically sends the output of the command on left side to the file on the right. but I am not sure what this ‘2>&1 &’ has to do with?
also what is the ‘:pty => false’ doing here?
if there is any good resource that helps to understand the basics of the above, pls point me to that.
@shankard… there are actually several parts to that chunk.
The trailing ‘&’ starts the quoted script running in the background
the ‘2>&1’ combines stdout (the ‘1’) and stderr (the ‘2’) into a
single output stream so that they both get merged into the output
file
the ‘#{puma_log}’ part names the output file that will contain
the merged output
the ‘>>’ is a shell redirection of the output to
the named file. ‘>>’ appends to an existing file, in contrast to ‘>’
which overwrites any pre-existing file.