<?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 Re: Where to find one Shell Script Programming Editor in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/where-to-find-one-shell-script-programming-editor/m-p/2760709#M72333</link>
    <description>Yes, these advises are exactly smart skills but I still do not believe that there is no product to help programmers to write shell scripts conveniently. After all, there are still many people who need to write shell scripts. &lt;BR /&gt;&lt;BR /&gt;Al.</description>
    <pubDate>Wed, 10 Jul 2002 06:59:31 GMT</pubDate>
    <dc:creator>albert_hua</dc:creator>
    <dc:date>2002-07-10T06:59:31Z</dc:date>
    <item>
      <title>Where to find one Shell Script Programming Editor</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/where-to-find-one-shell-script-programming-editor/m-p/2760703#M72327</link>
      <description>Hi, everyone: &lt;BR /&gt;I am a freshman towards shell script programming. Recently I have written a shell script which is about 300 sentences long. I just know to write a file with shell commands and then execute it directly under the current shell. Then some grammar errors occur. Grammar errors are relatively easy to position and correct but unfortunately there is some logical erros which are not easy to find without some tool aid. When I write C, I can find those logical errors easily with breakpoint or single step, etc. So I wonder whether there is some tools for shell programming providing the similar functions just as Turbo C. How and where can I get it? Thanks a lot! &lt;BR /&gt;&lt;BR /&gt;Al.</description>
      <pubDate>Wed, 10 Jul 2002 05:57:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/where-to-find-one-shell-script-programming-editor/m-p/2760703#M72327</guid>
      <dc:creator>albert_hua</dc:creator>
      <dc:date>2002-07-10T05:57:50Z</dc:date>
    </item>
    <item>
      <title>Re: Where to find one Shell Script Programming Editor</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/where-to-find-one-shell-script-programming-editor/m-p/2760704#M72328</link>
      <description>Hi Albert,&lt;BR /&gt;&lt;BR /&gt;do you know the command:&lt;BR /&gt;&lt;BR /&gt;set -o xtrace (to turn on debugging mode)&lt;BR /&gt;set +o xtrace (to turn off debugging mode)&lt;BR /&gt;&lt;BR /&gt;put the first command line as first line into your script, the second one as last line. You will get an output which shows you how the shell interprets a command line before executing it and after that the normal output of command lines.&lt;BR /&gt;&lt;BR /&gt;Allways stay on the bright side of life!&lt;BR /&gt;&lt;BR /&gt;Peter</description>
      <pubDate>Wed, 10 Jul 2002 06:04:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/where-to-find-one-shell-script-programming-editor/m-p/2760704#M72328</guid>
      <dc:creator>Peter Kloetgen</dc:creator>
      <dc:date>2002-07-10T06:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: Where to find one Shell Script Programming Editor</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/where-to-find-one-shell-script-programming-editor/m-p/2760705#M72329</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;That is good advice&lt;BR /&gt;&lt;BR /&gt;man sh-posix and go to the bottom of page-13&lt;BR /&gt;&lt;BR /&gt;there you will find&lt;BR /&gt;&lt;BR /&gt; | set [{-|+}abCefhkmnopstuvx] [{-|+}o option]... [{-|+}A&lt;BR /&gt;      name] [arg]...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;There are lots of interesting things there&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;FYI&lt;BR /&gt;&lt;BR /&gt;1)Easy way toprint man page&lt;BR /&gt;&lt;BR /&gt;man $*|lp -dprinter -on -otl66 -ol70&lt;BR /&gt;&lt;BR /&gt;2)see&lt;BR /&gt;&lt;A href="http://www.introcomp.co.uk/unixadmin.html" target="_blank"&gt;http://www.introcomp.co.uk/unixadmin.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Lots of example scripts&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;                 Steve Steel</description>
      <pubDate>Wed, 10 Jul 2002 06:19:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/where-to-find-one-shell-script-programming-editor/m-p/2760705#M72329</guid>
      <dc:creator>Steve Steel</dc:creator>
      <dc:date>2002-07-10T06:19:33Z</dc:date>
    </item>
    <item>
      <title>Re: Where to find one Shell Script Programming Editor</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/where-to-find-one-shell-script-programming-editor/m-p/2760706#M72330</link>
      <description>Thanks a lot for your advice.&lt;BR /&gt;But can I execute the shell program step by step or set some break points so that I can check the output interactively. &lt;BR /&gt;&lt;BR /&gt;Al.</description>
      <pubDate>Wed, 10 Jul 2002 06:33:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/where-to-find-one-shell-script-programming-editor/m-p/2760706#M72330</guid>
      <dc:creator>albert_hua</dc:creator>
      <dc:date>2002-07-10T06:33:12Z</dc:date>
    </item>
    <item>
      <title>Re: Where to find one Shell Script Programming Editor</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/where-to-find-one-shell-script-programming-editor/m-p/2760707#M72331</link>
      <description>Hi Albert,&lt;BR /&gt;&lt;BR /&gt;there is the possibility to let your script stop for a desired time period, use the command:&lt;BR /&gt;&lt;BR /&gt;sleep time_in_seconds&lt;BR /&gt;&lt;BR /&gt;to get the desired output, for example the value of a variable, you have to use the command:&lt;BR /&gt;&lt;BR /&gt;echo $variable&lt;BR /&gt;&lt;BR /&gt;which you can put into your script. To find logical errors, you can use the command:&lt;BR /&gt;&lt;BR /&gt;if test $var -ne desired_value&lt;BR /&gt;then&lt;BR /&gt;     exit 1&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;With exit you can set a return code for your script. The values can be 0-255.&lt;BR /&gt;&lt;BR /&gt;To check the return code of a command, do the following:&lt;BR /&gt;&lt;BR /&gt;command_to_be_run&lt;BR /&gt;echo $?&lt;BR /&gt;&lt;BR /&gt;this will give you the return code of the last command.&lt;BR /&gt;&lt;BR /&gt;Allways stay on the bright side of life!&lt;BR /&gt;&lt;BR /&gt;Peter</description>
      <pubDate>Wed, 10 Jul 2002 06:39:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/where-to-find-one-shell-script-programming-editor/m-p/2760707#M72331</guid>
      <dc:creator>Peter Kloetgen</dc:creator>
      <dc:date>2002-07-10T06:39:26Z</dc:date>
    </item>
    <item>
      <title>Re: Where to find one Shell Script Programming Editor</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/where-to-find-one-shell-script-programming-editor/m-p/2760708#M72332</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;in the code at appropriate points put&lt;BR /&gt;echo "press any key to continue"&lt;BR /&gt;read char&lt;BR /&gt;&lt;BR /&gt;so that unless u press any key it won't proceed&lt;BR /&gt;regds&lt;BR /&gt;ravi</description>
      <pubDate>Wed, 10 Jul 2002 06:53:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/where-to-find-one-shell-script-programming-editor/m-p/2760708#M72332</guid>
      <dc:creator>V. V. Ravi Kumar_1</dc:creator>
      <dc:date>2002-07-10T06:53:04Z</dc:date>
    </item>
    <item>
      <title>Re: Where to find one Shell Script Programming Editor</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/where-to-find-one-shell-script-programming-editor/m-p/2760709#M72333</link>
      <description>Yes, these advises are exactly smart skills but I still do not believe that there is no product to help programmers to write shell scripts conveniently. After all, there are still many people who need to write shell scripts. &lt;BR /&gt;&lt;BR /&gt;Al.</description>
      <pubDate>Wed, 10 Jul 2002 06:59:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/where-to-find-one-shell-script-programming-editor/m-p/2760709#M72333</guid>
      <dc:creator>albert_hua</dc:creator>
      <dc:date>2002-07-10T06:59:31Z</dc:date>
    </item>
    <item>
      <title>Re: Where to find one Shell Script Programming Editor</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/where-to-find-one-shell-script-programming-editor/m-p/2760710#M72334</link>
      <description>Hi Albert,&lt;BR /&gt;&lt;BR /&gt;i am working as trainer for Hewlett Packard in Germany, and i do courses in shell programming. Sorry for the bad news, but i don't know a tool for debugging shell scripts in HP-UX or any other UNIX/Linux.&lt;BR /&gt;&lt;BR /&gt;Allways stay on the bright side of life!&lt;BR /&gt;&lt;BR /&gt;Peter</description>
      <pubDate>Wed, 10 Jul 2002 07:07:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/where-to-find-one-shell-script-programming-editor/m-p/2760710#M72334</guid>
      <dc:creator>Peter Kloetgen</dc:creator>
      <dc:date>2002-07-10T07:07:12Z</dc:date>
    </item>
    <item>
      <title>Re: Where to find one Shell Script Programming Editor</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/where-to-find-one-shell-script-programming-editor/m-p/2760711#M72335</link>
      <description>Hi,&lt;BR /&gt;I'm attending an HP course right at this moment (writing this during a break :-) and the only thing the teacher can come up with (and which I already knew) is executing the script with "sh -x" in front of it.&lt;BR /&gt;&lt;BR /&gt;When making large scripts, consider the use of functions. Makes it a lot easier ...&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Tom</description>
      <pubDate>Wed, 10 Jul 2002 07:07:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/where-to-find-one-shell-script-programming-editor/m-p/2760711#M72335</guid>
      <dc:creator>Tom Geudens</dc:creator>
      <dc:date>2002-07-10T07:07:55Z</dc:date>
    </item>
    <item>
      <title>Re: Where to find one Shell Script Programming Editor</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/where-to-find-one-shell-script-programming-editor/m-p/2760712#M72336</link>
      <description>Hi, everyone:&lt;BR /&gt;So what I can do when I want to debug one shell program is to use 'set -o trace' or 'sh -x' and then add some self-designed 'echo' or other commands to trace the error at last? &lt;BR /&gt;I think perhaps you are right. Maybe people do not use shell script to develop large projects so that people think these small tools are enough to produce good programs. &lt;BR /&gt;Thanks everyone who remark. &lt;BR /&gt;&lt;BR /&gt;AL.</description>
      <pubDate>Wed, 10 Jul 2002 07:21:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/where-to-find-one-shell-script-programming-editor/m-p/2760712#M72336</guid>
      <dc:creator>albert_hua</dc:creator>
      <dc:date>2002-07-10T07:21:48Z</dc:date>
    </item>
    <item>
      <title>Re: Where to find one Shell Script Programming Editor</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/where-to-find-one-shell-script-programming-editor/m-p/2760713#M72337</link>
      <description>I have written some fairly large shell scripts and sorry, I don't know of any debug tools that you can purchase.  However, the following links provide some tutorials on shell programming:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.injunea.demon.co.uk/pages/page201.htm" target="_blank"&gt;http://www.injunea.demon.co.uk/pages/page201.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://steve-parker.org/sh/sh.shtml" target="_blank"&gt;http://steve-parker.org/sh/sh.shtml&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.cbi.cnptia.embrapa.br/manual/unix/unix_intro/Shell.html" target="_blank"&gt;http://www.cbi.cnptia.embrapa.br/manual/unix/unix_intro/Shell.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The following link provides information on debugging that you may find of use:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.injunea.demon.co.uk/pages/page213.htm" target="_blank"&gt;http://www.injunea.demon.co.uk/pages/page213.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I have always found it easier when coding a large project to always split from the main program and call subroutines.  Another coding hint would be to take a chunk at a time in a smaller script and when the code is correct, incorporate it into the larger script.  This will prevent debugging the larger code all the time.&lt;BR /&gt;&lt;BR /&gt;Hope this helps.</description>
      <pubDate>Wed, 10 Jul 2002 12:17:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/where-to-find-one-shell-script-programming-editor/m-p/2760713#M72337</guid>
      <dc:creator>Daimian Woznick</dc:creator>
      <dc:date>2002-07-10T12:17:28Z</dc:date>
    </item>
    <item>
      <title>Re: Where to find one Shell Script Programming Editor</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/where-to-find-one-shell-script-programming-editor/m-p/2760714#M72338</link>
      <description>Actually, you can have your shell script run page by page:&lt;BR /&gt;&lt;BR /&gt;sh -x shellscript 2&amp;gt;&amp;amp;1 | more&lt;BR /&gt;&lt;BR /&gt;The output of the tracing goes to stderr so it must be redirected to stdout and then piped to more. That way, you can run down the list until a problem occurs, then use CTRL-C to abort and you'll have the trace to that point. Note that functions called in the script will not inherit the -x (or set -x) option, so one technique is to export a TRACEON variable at the beginning of the script:&lt;BR /&gt;&lt;BR /&gt;export TRACEON=/sbin/true&lt;BR /&gt;&lt;BR /&gt;then in all the functions (and main too):&lt;BR /&gt;&lt;BR /&gt;if $TRACEON || set -x&lt;BR /&gt;&lt;BR /&gt;Another hint: always use set -u (you'll avoid big oops prob lems due to misspelled variables).&lt;BR /&gt;&lt;BR /&gt;Another place to post your question is in Usenet: comp.unix.shell&lt;BR /&gt;&lt;BR /&gt;And a great location for shell scripting techniques: &lt;A href="http://www.shelldorado.com" target="_blank"&gt;www.shelldorado.com&lt;/A&gt;</description>
      <pubDate>Wed, 10 Jul 2002 14:01:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/where-to-find-one-shell-script-programming-editor/m-p/2760714#M72338</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2002-07-10T14:01:19Z</dc:date>
    </item>
    <item>
      <title>Re: Where to find one Shell Script Programming Editor</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/where-to-find-one-shell-script-programming-editor/m-p/2760715#M72339</link>
      <description>Presumably you're talking about the POSIX shell&lt;BR /&gt;or the (shudder) Bourne shell.  These are largely&lt;BR /&gt;compatible with the Korn shell, for which there is&lt;BR /&gt;a rudimentary but freely available debugger called&lt;BR /&gt;kshdb.  Perhaps you can use kshdb to debug your&lt;BR /&gt;script.&lt;BR /&gt;&lt;BR /&gt;I have not use kshdb in quite some time (for longer&lt;BR /&gt;scripting tasks I find Perl to be better suited) but&lt;BR /&gt;as I recall kshdb supports breakpoints and stepping.&lt;BR /&gt;You can also execute arbitrary shell commands&lt;BR /&gt;at the debugger prompt.&lt;BR /&gt;&lt;BR /&gt;You can find more info on kshdb in the O'Reilly book&lt;BR /&gt;"Learning the Korn Shell"&lt;BR /&gt;(&lt;A href="http://www.oreilly.com/catalog/korn2/)." target="_blank"&gt;http://www.oreilly.com/catalog/korn2/).&lt;/A&gt;&lt;BR /&gt;In the past kshdb was available at ftp.uu.net.  Perhaps&lt;BR /&gt;a web search will turn up its current location.&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 10 Jul 2002 16:33:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/where-to-find-one-shell-script-programming-editor/m-p/2760715#M72339</guid>
      <dc:creator>Gregory Fruth</dc:creator>
      <dc:date>2002-07-10T16:33:49Z</dc:date>
    </item>
    <item>
      <title>Re: Where to find one Shell Script Programming Editor</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/where-to-find-one-shell-script-programming-editor/m-p/2760716#M72340</link>
      <description>Does this make you a happy camper?&lt;BR /&gt;HTH, Tom.&lt;BR /&gt;---&lt;BR /&gt;&lt;A href="http://www.nedit.org" target="_blank"&gt;http://www.nedit.org&lt;/A&gt; : free software (GPL).&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.nedit.org/about/features.shtml" target="_blank"&gt;http://www.nedit.org/about/features.shtml&lt;/A&gt;&lt;BR /&gt;NEdit is a standard GUI (Graphical User Interface) style text editor for programs and plain-text files. Users of Macintosh and MS Windows based text editors should find NEdit a familiar and comfortable environment. NEdit provides all of the standard menu, dialog, editing, and mouse support, as well as all of the standard shortcuts to which the users of modern GUI based environments are accustomed. For users of older style Unix editors, welcome to the world of mouse-based editing! &lt;BR /&gt;...&lt;BR /&gt;Features for programmers&lt;BR /&gt;State of the art syntax highlighting with built-in patterns for C, C++, Java, Ada, FORTRAN, Pascal, Yacc, Perl, Python, Tcl, Csh, Awk, HTML, LaTeX, VHDL, Verilog, and more. &lt;BR /&gt;Auto-indent, programmable language-sensitive smart-indent. &lt;BR /&gt;Block indentation adjustment &lt;BR /&gt;Parenthesis flashing and matching &lt;BR /&gt;Find lines directly from compiler error output &lt;BR /&gt;Tab emulation &lt;BR /&gt;Unix ctags support &lt;BR /&gt;Client/Server mode for integration with software development tools. &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 11 Jul 2002 13:19:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/where-to-find-one-shell-script-programming-editor/m-p/2760716#M72340</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-07-11T13:19:12Z</dc:date>
    </item>
    <item>
      <title>Re: Where to find one Shell Script Programming Editor</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/where-to-find-one-shell-script-programming-editor/m-p/2760717#M72341</link>
      <description>Thomas:&lt;BR /&gt;Thanks for your sincere help.&lt;BR /&gt;I have downloaded this software.&lt;BR /&gt;It seems terrific.&lt;BR /&gt;I think I will try to use it and recommend it to others.&lt;BR /&gt;&lt;BR /&gt;Al.</description>
      <pubDate>Fri, 12 Jul 2002 07:10:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/where-to-find-one-shell-script-programming-editor/m-p/2760717#M72341</guid>
      <dc:creator>albert_hua</dc:creator>
      <dc:date>2002-07-12T07:10:20Z</dc:date>
    </item>
    <item>
      <title>Re: Where to find one Shell Script Programming Editor</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/where-to-find-one-shell-script-programming-editor/m-p/2760718#M72342</link>
      <description>might my answer get even 10 points;-)&lt;BR /&gt;&lt;BR /&gt;for those who want to play with it on a rainy weekend:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.nedit.org/ftp/v5_3/executables/nedit-5.3-hpux.tar.Z" target="_blank"&gt;http://www.nedit.org/ftp/v5_3/executables/nedit-5.3-hpux.tar.Z&lt;/A&gt;&lt;BR /&gt;other *ix:&lt;BR /&gt;&lt;A href="http://www.nedit.org/ftp/v5_3/executables/" target="_blank"&gt;http://www.nedit.org/ftp/v5_3/executables/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.nedit.org/cgi-bin/ftpBrowser.pl?dir=contrib/highlighting" target="_blank"&gt;http://www.nedit.org/cgi-bin/ftpBrowser.pl?dir=contrib/highlighting&lt;/A&gt;</description>
      <pubDate>Sat, 13 Jul 2002 19:12:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/where-to-find-one-shell-script-programming-editor/m-p/2760718#M72342</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-07-13T19:12:28Z</dc:date>
    </item>
  </channel>
</rss>

