I have bash script
#!/bin/sh
export DEBIAN_FRONTEND=noninteractive;
apt-get update;
apt-get -y upgrade;
apt-get install -y python-pip python-dev nginx;
##After the command output shows visible commands after + sign in bash
set -x -e
pip install virtualenv;
virtualenv /home/user/virtualenv;
source /home/user/virtualenv/bin/activate;
pip install gunicorn;
systemctl start gunicorn;
systemctl restart nginx;
The Output of command show like
+ virtualenv /home/user/virtualenv
New python executable in /home/user/virtualenv/bin/python
Installing setuptools, pip, wheel...done.
+ source /home/user/virtualenv/bin/activate
++ deactivate nondestructive
++ unset -f pydoc
++ '[' -z '' ']'
++ '[' -z '' ']'
++ '[' -n /bin/bash ']'
++ hash -r
++ '[' -z '' ']'
++ unset VIRTUAL_ENV
++ '[' '!' nondestructive = nondestructive ']'
++ VIRTUAL_ENV=/home/user/virtualenv
++ export VIRTUAL_ENV
++ _OLD_VIRTUAL_PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
++ PATH=/var/www/html/askbotenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
++ export PATH
++ '[' -z '' ']'
++ '[' -z '' ']'
++ _OLD_VIRTUAL_PS1=
++ '[' x '!=' x ']'
+++ basename /home/user/virtualenv
++ PS1='(askbotenv) '
++ export PS1
++ alias pydoc
++ '[' -n /bin/bash ']'
++ hash -r
+ pip install gunicorn
Collecting gunicorn
I want to remove those +
sign before the command due to set -x -e
set -x -e
enters a sub-process?)