<?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: Shell Help in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-help/m-p/2807611#M83463</link>
    <description>Hi (again) Shannon:&lt;BR /&gt;&lt;BR /&gt;I should hasten to add that this inbuilt substitution works identically in the Posix shell, too (man 'sh-posix').&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
    <pubDate>Tue, 17 Sep 2002 12:55:01 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2002-09-17T12:55:01Z</dc:date>
    <item>
      <title>Shell Help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-help/m-p/2807609#M83461</link>
      <description>Is there a way in Korn Shell, to remove file extentions from filenames with internal shell variables like in c-shell?  if so, how would I do this?&lt;BR /&gt;&lt;BR /&gt;Scenario.  I need to list zip files in a directory of about 1000 files.  Shell internals are much faster than piping to awk or sed to get the same thing done.&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;Shannon</description>
      <pubDate>Tue, 17 Sep 2002 11:54:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-help/m-p/2807609#M83461</guid>
      <dc:creator>Shannon Petry</dc:creator>
      <dc:date>2002-09-17T11:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: Shell Help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-help/m-p/2807610#M83462</link>
      <description>Hi Shannon:&lt;BR /&gt;&lt;BR /&gt;See the man pages for 'ksh':&lt;BR /&gt;&lt;BR /&gt;${parameter#pattern}&lt;BR /&gt;${parameter##pattern}&lt;BR /&gt;&lt;BR /&gt;${parameter%pattern}&lt;BR /&gt;${parameter%%pattern}&lt;BR /&gt;&lt;BR /&gt;For example:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;X=/tmp/myfile.log&lt;BR /&gt;Y=${X%%.log}&lt;BR /&gt;echo $X&lt;BR /&gt;echo $Y&lt;BR /&gt;exit 0&lt;BR /&gt;&lt;BR /&gt;...echos:&lt;BR /&gt;&lt;BR /&gt;/tmp/myfile.log&lt;BR /&gt;/tmp/myfile&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
      <pubDate>Tue, 17 Sep 2002 12:03:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-help/m-p/2807610#M83462</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2002-09-17T12:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: Shell Help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-help/m-p/2807611#M83463</link>
      <description>Hi (again) Shannon:&lt;BR /&gt;&lt;BR /&gt;I should hasten to add that this inbuilt substitution works identically in the Posix shell, too (man 'sh-posix').&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 17 Sep 2002 12:55:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-help/m-p/2807611#M83463</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2002-09-17T12:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: Shell Help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-help/m-p/2807612#M83464</link>
      <description>Thanks a bunch.  &lt;BR /&gt;I try to avoid POSIX as I script for HP-UX, SunOS/Solaris, IRIX, and AIX for the same applications and utilities.  So, while I think it's grand that HP-UX supports the POSIX shell, it is not globally available, and I need to write things that work everywhere.  &lt;BR /&gt;Literally the first part of any of my scripts is&lt;BR /&gt;OS=`uname`&lt;BR /&gt;case $OS in&lt;BR /&gt;  HP-UX) ;;&lt;BR /&gt;  SunOS);;&lt;BR /&gt;etc...&lt;BR /&gt;esac &lt;BR /&gt;In the case I define OS specific paths, and redefine awk to nawk, etc... but that is as much as I modify to make things work across the board.&lt;BR /&gt;&lt;BR /&gt;Thanks again!&lt;BR /&gt;Shannon</description>
      <pubDate>Tue, 17 Sep 2002 13:24:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-help/m-p/2807612#M83464</guid>
      <dc:creator>Shannon Petry</dc:creator>
      <dc:date>2002-09-17T13:24:50Z</dc:date>
    </item>
  </channel>
</rss>

