The University of Queensland
Menu
  • Home
  • CSSE2310
  • 2012s1
  • Resources
  • Unixhelp
  • Scrpt

Debugging shell scripts

To see where a script produces an error use the command:

   sh -x script argument

The -x option to the sh command tells it to print commands and their arguments as they are executed.

You can then see what stage of the script has been reached when an error occurs.

  • Other debugging options
  • Example

[Home] [Search] [Index]

On This Site

  • Scrpt1
  • Scrpt1 1
  • Scrpt1 2
  • Scrpt1 2 2
  • Scrpt1 2 3
  • Scrpt1 2 4
  • Scrpt1a
  • Scrpt2
  • Scrpt2 1
  • Scrpt2 1 2
  • Scrpt2 1 3
  • Scrpt2 1 3 1
  • Scrpt2 10
  • Scrpt2 2
  • Scrpt2 2 1
  • Scrpt2 2 2
  • Scrpt2 2 3
  • Scrpt2 3
  • Scrpt2 4
  • Scrpt2 4 1
  • Scrpt2 4 1 2
  • Scrpt2 4 2
  • Scrpt2 4 2 1
  • Scrpt2 4 3
  • Scrpt2 4 3 1
  • Scrpt2 5
  • Scrpt2 6
  • Scrpt2 6 1
  • Scrpt2 6 1 1
  • Scrpt2 6 2
  • Scrpt2 6 2 1
  • Scrpt2 6 3
  • Scrpt2 6 3 2
  • Scrpt2 6 4
  • Scrpt2 6 4 1
  • Scrpt2 7
  • Scrpt2 7 1
  • Scrpt2 7 2
  • Scrpt2 7 3
  • Scrpt2 7 4
  • Scrpt2 7 5
  • Scrpt2 8
  • Scrpt2 8 1
  • Scrpt2 8 Op
  • Scrpt2 9
  • Scrpt2 9 1
  • Scrpt2 9 2
  • Scrpt2 9 3
  • Scrpt2 X
The University of Queensland, Australia
Brisbane St Lucia, QLD 4072

+61 7 3365 1111

Other Campuses: UQ Ipswich,
UQ Gatton, UQ Herston

Maps and Directions

© 2013 The University of Queensland

A Member of

Universitas 21 Group of 8

Terms of use | Feedback

ABN: 63 942 912 684
CRICOS Provider No: 00025B

Quick Links

  • For Media
  • Emergency Contact

Social Media

  • Facebook
  • Twitter
  • iTunes U
  • YouTube Channel

Explore

  • Giving to UQ
  • Faculties & Divisions
  • UQ Jobs
  • Contact UQ
  • Services & Facilities