sh - New line in git hook -
i have git hook calls php file. php file produce output (after running unit tests). te hook file sh file. output php file echoed terminal, \n stripped, , on single line. ideas have have new lines?
thanks
you can try and, in sh script,
- assign output of php script variable
avar
; echo variable with:
echo -e "${avar}"
that should keep newlines, mentioned in "echo multiple lines file".
the same link mentions printf
well.
printf '%s\n' "${avar}"
Comments
Post a Comment