linux - How to let the bash shell output font with color? -


i meet command output problems, using 'phpunit' command example.

i run phpunit command directly in linux term, , there output red/green font color.

$>> phpunit --bootstrap src/autoload.php tests/exampletestcase.php 

but when put command bash file(test.sh):

------------test.sh------------- #!/bin/bash file=$1 phpunit --bootstrap src/autoload.php $file -------------------------------  $>> chmod u+x test.sh $>> ./test.sh 

the output font color gone. how fix it?

test this:

replace

#!/bin/bash 

by

#!/bin/bash -l 

Comments

Popular posts from this blog

java - Could not locate OpenAL library -

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

sorting - opencl Bitonic sort with 64 bits keys -