Unix/Linux Go Back    

Shell Programming and Scripting BSD, Linux, and UNIX shell scripting — Post awk, bash, csh, ksh, perl, php, python, sed, sh, shell scripts, and other shell scripting languages questions here.

How to set echo on

Shell Programming and Scripting

Thread Tools Search this Thread Display Modes
Old Unix and Linux 11-17-2005
siegfried siegfried is offline
Registered User
Join Date: Oct 2005
Last Activity: 18 April 2016, 10:56 PM EDT
Location: Woodinville, WA
Posts: 138
Thanks: 0
Thanked 0 Times in 0 Posts
How to set echo on

I'm looking at my bash man page and I'm expecting to find some option that I can use to make it echo every command that it executes. The description of --verbose was pretty terse!

Is --verbose supposed to make it echo every command it executes?

My bash script script (named ws2) contains a single function (named ws) and I cannot get it to echo the commands.

Maybe I don't understand functions. When I type

bash --verbose ~/.bash/ws2

no commands are echoed. Could that be because there are no commands and only a single function?


Now I type

ws arg1 arg2

Hmm... It appears to execute. Now how do I make it echo every command?

Sponsored Links
Old Unix and Linux 11-18-2005
Ygor's Unix or Linux Image
Ygor Ygor is offline Forum Advisor  
Join Date: Oct 2003
Last Activity: 15 May 2015, 11:55 AM EDT
Location: 54.23, -4.53
Posts: 1,801
Thanks: 1
Thanked 114 Times in 99 Posts
Try using set -x or search for xtrace in the bash man pages.
Sponsored Links

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
With that logic this echoes "echo". Question about echo! hakermania Shell Programming and Scripting 2 11-11-2010 05:13 PM
Help with echo mac4rfree Shell Programming and Scripting 6 12-17-2009 04:57 PM
Help with echo and sed limmer Shell Programming and Scripting 2 11-27-2009 01:53 PM
How to correctly use an echo inside an echo? mokachoka UNIX for Dummies Questions & Answers 3 09-19-2009 11:40 PM
Difference between using "echo" builtin and /bin/echo ulidtko Shell Programming and Scripting 2 07-15-2009 11:12 AM

All times are GMT -4. The time now is 03:31 AM.