Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] displaying executed commands in shell scripts
- Date: Fri, 8 Jun 2007 13:47:48 +0900
- From: Dave Brown <dagbrown@example.com>
- Subject: Re: [tlug] displaying executed commands in shell scripts
- References: <a96ae3bb0706072143x7a10cd22kf1d86aca73b97cbf@mail.gmail.com>
- User-agent: Mutt/1.4.2.3i
On Fri, Jun 08, 2007 at 01:43:17PM +0900, Hector Akamine wrote: > Hi, > > Is there any way to make the shell console display the commands > executed when a shell script is invoked? For example, if I write a > shell script that contains the command "ls" and I run it, only the > output of the command (in this case the current directory's files) is > displayed on the console window, but not the invoked command ("ls"), I > would like the latter displayed too. An easy one! Just run the script with "sh -x script" to turn on the running commentary. If you just want it on for part of the script, put the line set -x before where you want the output, and set +x afterwards. --Dave
- Follow-Ups:
- Re: [tlug] displaying executed commands in shell scripts
- From: Al Hoang
- References:
- [tlug] displaying executed commands in shell scripts
- From: Hector Akamine
Home | Main Index | Thread Index
- Prev by Date: [tlug] displaying executed commands in shell scripts
- Next by Date: Re: [tlug] displaying executed commands in shell scripts
- Previous by thread: [tlug] displaying executed commands in shell scripts
- Next by thread: Re: [tlug] displaying executed commands in shell scripts
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links