I have the following commands that I want to have them all in one shell file:su  s3lizinfo.sh bwhen the first linex executes, it prompts and the command prompt become like as below: -bash-3.1$ (here I cant type second command >> lizinfo.sh b)I want to have my shell file run all of these command at once. But when I run my shell file it only runs the first line and for does not run the second line, and waits until I enter it manually.Would you help me please ?
shell scripting and running after switching to other user
shell script;su
Use the -c option:su - s3 -c second command