Re: How to make a BASH script echo the commands?



Chris F.A. Johnson wrote:
On 2006-03-29, Chris Carlen wrote:
Hi:

I simply want the full form of the command lines being executed to output to stdio, not just the output from the commands being execed.

How to do this?

Use either the -v or -x option, depending on what you want.

You can do this by calling the script as an argument to the shell
command:

bash -v scriptname

Or by incorporating it in a shebang as the first line of your
script:

#! /bin/bash -x

Or by using set in your script:

set -v


Thanks!



--
Good day!

________________________________________
Christopher R. Carlen
Principal Laser&Electronics Technologist
Sandia National Laboratories CA USA
crcarleRemoveThis@xxxxxxxxxxxxxxx
NOTE, delete texts: "RemoveThis" and
"BOGUS" from email address to reply.
.



Relevant Pages