Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2010
    Posts
    15

    Unanswered: Is there a way to turn on line#'s on unix debug?

    I am using: ksh -nx ./test_IT.sh to debug my script. It returns a line that says '' ' is not expected. 403-057 Syntax error at line 32: ".

    Then is use VI to look at the script. Is there anyway I can set some option so I can see which line is line # 32. I have a lot of 'echo' statements in my script so it is very difficult to tell which line it is pointing to.

    THanks!

  2. #2
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Colon-it...

    Quote Originally Posted by ncsthbell View Post
    I am using: ksh -nx ./test_IT.sh to debug my script. It returns a line that says '' ' is not expected. 403-057 Syntax error at line 32: ".

    Then is use VI to look at the script. Is there anyway I can set some option so I can see which line is line # 32. I have a lot of 'echo' statements in my script so it is very difficult to tell which line it is pointing to.

    THanks!
    In vi, type colon ( : ) and the line number. The cursor will go to that line.
    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

  3. #3
    Join Date
    Sep 2009
    Location
    Ontario
    Posts
    1,057
    Provided Answers: 1
    or in vi do:
    <esc>:set number
    to turn line numbering on.
    and
    <esc>:set nonumber
    to turn line numbering off.

    Or depending upon the OS and whether you are using vi or vim, you can set line numbering on in ~/.exrc or ~/.vimrc .

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •