<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Debug script shell ( posix ) in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/debug-script-shell-posix/m-p/2459969#M13799</link>
    <description>Hi&lt;BR /&gt;&lt;BR /&gt;I don?t remember how debug script or trace all the task of script &lt;BR /&gt;&lt;BR /&gt;thanks &lt;BR /&gt;&lt;BR /&gt;Paulo</description>
    <pubDate>Tue, 31 Oct 2000 18:00:41 GMT</pubDate>
    <dc:creator>Paulo Afonso Bruno</dc:creator>
    <dc:date>2000-10-31T18:00:41Z</dc:date>
    <item>
      <title>Debug script shell ( posix )</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/debug-script-shell-posix/m-p/2459969#M13799</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;I don?t remember how debug script or trace all the task of script &lt;BR /&gt;&lt;BR /&gt;thanks &lt;BR /&gt;&lt;BR /&gt;Paulo</description>
      <pubDate>Tue, 31 Oct 2000 18:00:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/debug-script-shell-posix/m-p/2459969#M13799</guid>
      <dc:creator>Paulo Afonso Bruno</dc:creator>
      <dc:date>2000-10-31T18:00:41Z</dc:date>
    </item>
    <item>
      <title>Re: Debug script shell ( posix )</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/debug-script-shell-posix/m-p/2459970#M13800</link>
      <description>set -x turns on execute tracing.  set +x turns it off.</description>
      <pubDate>Tue, 31 Oct 2000 18:11:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/debug-script-shell-posix/m-p/2459970#M13800</guid>
      <dc:creator>Alan Riggs</dc:creator>
      <dc:date>2000-10-31T18:11:43Z</dc:date>
    </item>
    <item>
      <title>Re: Debug script shell ( posix )</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/debug-script-shell-posix/m-p/2459971#M13801</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;Use the -x and/or -v options.&lt;BR /&gt;&lt;BR /&gt;-v to print shell input lines as they are read.&lt;BR /&gt;&lt;BR /&gt;-x  to print commands and their arguments as they are executed.&lt;BR /&gt;&lt;BR /&gt;Thus:&lt;BR /&gt;&lt;BR /&gt;# sh -x -v &lt;THE_SCRIPT&gt;&lt;/THE_SCRIPT&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 31 Oct 2000 18:13:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/debug-script-shell-posix/m-p/2459971#M13801</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2000-10-31T18:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: Debug script shell ( posix )</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/debug-script-shell-posix/m-p/2459972#M13802</link>
      <description>Paulo,&lt;BR /&gt;&lt;BR /&gt;You can also just set the -x on the first line that specifies your shell:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/ksh -x&lt;BR /&gt;&lt;BR /&gt;-Tim</description>
      <pubDate>Tue, 31 Oct 2000 18:21:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/debug-script-shell-posix/m-p/2459972#M13802</guid>
      <dc:creator>Timothy Czarnik</dc:creator>
      <dc:date>2000-10-31T18:21:38Z</dc:date>
    </item>
    <item>
      <title>Re: Debug script shell ( posix )</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/debug-script-shell-posix/m-p/2459973#M13803</link>
      <description>Hi Paulo,&lt;BR /&gt;&lt;BR /&gt;what the others wrote is really the usual way to do something what comes anyway close to debugging as far as shell scripts are concerned.&lt;BR /&gt;&lt;BR /&gt;Actually I prefer piping stdout and stderr directly into more&lt;BR /&gt;&lt;BR /&gt;$ sh -v -x myscript.sh 2&amp;gt;&amp;amp;1 | more&lt;BR /&gt;&lt;BR /&gt;Apart from this you can do it the old Fortran way (before the advent of debuggers)&lt;BR /&gt;in spreading echo and read statements in your code to mimic breakpoints.&lt;BR /&gt;Since you don't have to recompile your code each time, as you would have if you didn't use an interpreted language, I would say this is acceptable.&lt;BR /&gt;&lt;BR /&gt;Another option may be the following link to the Oreilly FTP server, where you can download from some wrapper code that acts as a debugger for the Kornshell.&lt;BR /&gt;Just get the tarball from there:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="ftp://ftp.oreilly.com/published/oreilly/nutshell/ksh/" target="_blank"&gt;ftp://ftp.oreilly.com/published/oreilly/nutshell/ksh/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;But if you want to do some more serious scripting none of the Unix shells is really an option IMHO because they all lack the possibility to modularize the code.&lt;BR /&gt;In the long run you alway end up cutting and pasting bits ad nauseam.&lt;BR /&gt;&lt;BR /&gt;Thus, I would advise to spend some time in getting to know Perl.&lt;BR /&gt;It really pays, and with Perl you still can do (almost) all what you would do from shell scripts.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 01 Nov 2000 08:23:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/debug-script-shell-posix/m-p/2459973#M13803</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2000-11-01T08:23:52Z</dc:date>
    </item>
  </channel>
</rss>

