Bash shell file... echo on?
I have been trying to create .sh files that actually show me what they are doing when executed.
If I remember accurately, in DOS there was the command "echo on" that activated the output to the screen. Is it possible to do this in linux? I'd like to be able to click on a .sh file (KDE, Dolphin) and get a terminal window where all the commands run sequentially (windows .bat style) I'd appreciate your suggestions... |
Run the command with
Code:
bash -x Code:
#!/bin/bash -x |
See also the -v switch
|
Most desktops have also a small checkbox on the run dialogs that you can mark that says something like "Run application in a terminal".
By the way, this has nothing to do with the echo on/off functionality in DOS. What you are asking for is for an application to be launched into a terminal, which is a different thing. If you want to do that from your browser by just clicking on a given icon, you will need to change the associations for the script filetypes on the config of your desktop/file explorer, and add something like "xterm -e" in front of the actual command that is used to open that application. In addition to that you might need to modify the scripts as people told you above. |
All times are GMT -5. The time now is 12:11 AM. |