How to set echo on | Unix Linux Forums | Shell Programming and Scripting

  Unix/Linux Go Back    


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

How to set echo on

Shell Programming and Scripting


Closed Linux or Unix Question    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 11-17-2005
siegfried siegfried is offline
Registered User
 
Join Date: Oct 2005
Last Activity: 8 February 2015, 3:29 PM EST
Location: Bellevue, WA
Posts: 125
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?

OK,

Now I type

ws arg1 arg2

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

Thanks,
Siegfried
Sponsored Links
    #2  
Old Unix and Linux 11-18-2005
Ygor's Unix or Linux Image
Ygor Ygor is offline Forum Advisor  
Advisor
 
Join Date: Oct 2003
Last Activity: 10 November 2014, 6:18 PM EST
Location: 54.23, -4.53
Posts: 1,801
Thanks: 1
Thanked 112 Times in 98 Posts
Try using set -x or search for xtrace in the bash man pages.
Sponsored Links
Closed Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Unix or Linux Image 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 05:23 AM.