Skip to main content

Thread: make bash script run like batch with echo on, possible?


is there way make bash script run in terminal dos batch echo on? say, every line in script appears in terminal if typed in hand, followed system's response appear if had entered command hand, line line, until script finishes, , return prompt can scroll , study how went or go on typing in more commands?

i've seen people advise -x switch in shebang, #!/bin/bash -x , seen trick of invoking script "gnome-terminal -e scriptname.sh" neither 1 of same thing. if not bash there other linux scripting language supports mode this? right i'm missing 4dos.

you turn on 'debug' in script echo each of commands executed.
i.e. add command 'set -x' line 1 in script, , 'set +x' last line in script.

can use gnome-terminal command run it, added 'bash' commands keep terminal open.

e.g.
code:
gnome-terminal -e "bash -c \"yourscriptfilename; exec bash\""


Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [SOLVED] make bash script run like batch with echo on, possible?


Ubuntu

Comments

Popular posts from this blog

how to devide a circle into equal parts

"Could not fill because there are not enough opaque source pixels" - not solved by any other thread

Why can't I change the billing info for my account?