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

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -

Nuget pack csproj using nuspec -