?
Solved

Linux 'set -x'

Posted on 2011-10-25
3
Medium Priority
?
331 Views
Last Modified: 2012-06-27
I wrote the following script:

+ cat a.sh
set -x
echo 'Point 1'
set -x
echo 'Point 2'

Open in new window


When I execute it , I get the following:

+ echo 'Point 1'
Point 1
+ set -x
+ echo 'Point 2'
Point 2

Open in new window


This site:

http://www.cyberciti.biz/tips/debugging-shell-script.html

says that the second 'set -x' should turn off the debugging info, but that is not happening in my short script on RHEL 5.6 ksh

How can I turn off the 'set -x' in the middle of a script ?
0
Comment
Question by:Los Angeles1
3 Comments
 
LVL 8

Expert Comment

by:pilson66
ID: 37024929
set -x
echo 'Point 1'
echo 'Point 2'

Open in new window

0
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 2000 total points
ID: 37024942
Just

set +x

0
 

Author Closing Comment

by:Los Angeles1
ID: 37025033
Sorry, I misread the doc
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month17 days, 10 hours left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question