Program Does not execute

Hi there,

When I am trying to execute any shell script.
The shell script only execute line 1 and I notice that the rest o the program was not executed. Please advise.

[root:...ktop/Script-Order/0-restart]# bash +x vmscript-4.sh

Even when I enter this command there is not output.

sudo su
cd /tmp
cp /usr/lib/vmware/modules/source/vmmon.tar .
tar xf vmmon.tar
rm vmmon.tar
wget https://raw.githubusercontent.com/mkubecek/vmware-host-modules/fadedd9c8a4dd23f74da2b448572df95666dfe12/vmmon-only/linux/hostif.c
mv -f hostif.c vmmon-only/linux/hostif.c 
tar cf vmmon.tar vmmon-only
rm -fr vmmon-only
mv -f vmmon.tar /usr/lib/vmware/modules/source/vmmon.tar 
vmware-modconfig --console --install-all
echo 'Running'

This is the script I am trying to run.
It is not only this script. it is just about every other script there is.

Does "every other script there is" also start with sudo su ? That logs into another user, usually root, and waits for stdin. Once you terminate that session, your script will continue. You could offer commands / script on stdin, e.g. by a here document.

Either this or (IMHO cleaner):

sudo su - root -c "/here/goes/the/command -args"

I hope this helps.

bakunin