<?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: Scripting Help in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/3369754#M713488</link>
    <description>I now understand the syntax.&lt;BR /&gt;Thanks for your help !&lt;BR /&gt;&lt;BR /&gt;Rene</description>
    <pubDate>Wed, 01 Sep 2004 08:02:17 GMT</pubDate>
    <dc:creator>Rene_17</dc:creator>
    <dc:date>2004-09-01T08:02:17Z</dc:date>
    <item>
      <title>Scripting Help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/3369743#M713477</link>
      <description>I need a script for following problem !&lt;BR /&gt;&lt;BR /&gt;I need to find all files with .afi extention.&lt;BR /&gt;After that i must cut the extention .afi und run a command with the files without extention.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 01 Sep 2004 04:33:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/3369743#M713477</guid>
      <dc:creator>Rene_17</dc:creator>
      <dc:date>2004-09-01T04:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/3369744#M713478</link>
      <description>Script:&lt;BR /&gt;&lt;BR /&gt;!/bin/sh&lt;BR /&gt;set -x&lt;BR /&gt;for f in *.afi&lt;BR /&gt;do&lt;BR /&gt;afena $f ~/tmp&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;I must cut the .afi extention that afena command works !&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;rene</description>
      <pubDate>Wed, 01 Sep 2004 04:43:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/3369744#M713478</guid>
      <dc:creator>Rene_17</dc:creator>
      <dc:date>2004-09-01T04:43:53Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/3369745#M713479</link>
      <description>!/bin/sh&lt;BR /&gt;set -x&lt;BR /&gt;for f in `ls *.afi | sed 's/\.afi$//'`&lt;BR /&gt;do&lt;BR /&gt;afena $f ~/tmp&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;the sed will strip trailing ".afi" from each file.  This will also work for files with multiple "." eg file.1.afi etc</description>
      <pubDate>Wed, 01 Sep 2004 05:08:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/3369745#M713479</guid>
      <dc:creator>Simon Hargrave</dc:creator>
      <dc:date>2004-09-01T05:08:36Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/3369746#M713480</link>
      <description>Hi Rene,&lt;BR /&gt;&lt;BR /&gt;for i in `ls *.afi|awk -F. '{print $1}'`&lt;BR /&gt;do&lt;BR /&gt;afena $i&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;This should work&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Franky</description>
      <pubDate>Wed, 01 Sep 2004 05:50:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/3369746#M713480</guid>
      <dc:creator>Franky_1</dc:creator>
      <dc:date>2004-09-01T05:50:34Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/3369747#M713481</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Just for your information, because previous posts works, it's sometimes useful to know about shell's capabilities. For example :&lt;BR /&gt;&lt;BR /&gt;phelix&amp;gt; A=foo.abcd&lt;BR /&gt;phelix&amp;gt; echo $(basename $A .abcd)&lt;BR /&gt;foo&lt;BR /&gt;phelix&amp;gt; echo ${foo%%.abcd}&lt;BR /&gt;foo&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Jean-Louis</description>
      <pubDate>Wed, 01 Sep 2004 05:53:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/3369747#M713481</guid>
      <dc:creator>Jean-Louis Phelix</dc:creator>
      <dc:date>2004-09-01T05:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/3369748#M713482</link>
      <description>&lt;BR /&gt;On the console the commands works !&lt;BR /&gt;&lt;BR /&gt;Command: for f in 'ls *.afi | sed 's/\.afi$//''&lt;BR /&gt;&lt;BR /&gt;But in the Script it didnÂ´t work ?&lt;BR /&gt;&lt;BR /&gt;Message:&lt;BR /&gt;+ afena ls t1.afi t2.afi | sed s/.afi$//&lt;BR /&gt;&lt;BR /&gt;?????????????&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Re</description>
      <pubDate>Wed, 01 Sep 2004 07:02:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/3369748#M713482</guid>
      <dc:creator>Rene_17</dc:creator>
      <dc:date>2004-09-01T07:02:54Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/3369749#M713483</link>
      <description>&lt;BR /&gt;On the console the commands works !&lt;BR /&gt;&lt;BR /&gt;Command: for f in 'ls *.afi | sed 's/\.afi$//''&lt;BR /&gt;&lt;BR /&gt;But in the Script it didnÂ´t work ?&lt;BR /&gt;&lt;BR /&gt;Message:&lt;BR /&gt;+ afena ls t1.afi t2.afi | sed s/.afi$//&lt;BR /&gt;&lt;BR /&gt;?????????????&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Re</description>
      <pubDate>Wed, 01 Sep 2004 07:03:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/3369749#M713483</guid>
      <dc:creator>Rene_17</dc:creator>
      <dc:date>2004-09-01T07:03:15Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/3369750#M713484</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;why don't you just use the "awk" solution?&lt;BR /&gt;Even works in the script&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Franky</description>
      <pubDate>Wed, 01 Sep 2004 07:14:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/3369750#M713484</guid>
      <dc:creator>Franky_1</dc:creator>
      <dc:date>2004-09-01T07:14:28Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/3369751#M713485</link>
      <description>I notized that there where special characters around the command !&lt;BR /&gt;&lt;BR /&gt;Thanks for your Help !&lt;BR /&gt;&lt;BR /&gt;I only have one question !&lt;BR /&gt;&lt;BR /&gt;Descripe to me the several characters above:&lt;BR /&gt;&lt;BR /&gt;", ',`Â´&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Re</description>
      <pubDate>Wed, 01 Sep 2004 07:21:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/3369751#M713485</guid>
      <dc:creator>Rene_17</dc:creator>
      <dc:date>2004-09-01T07:21:48Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/3369752#M713486</link>
      <description>You have changed the quoting on the "not working version".&lt;BR /&gt;&lt;BR /&gt;It should read: -&lt;BR /&gt;&lt;BR /&gt;for f in `ls *.afi | sed 's/\.afi$//'`&lt;BR /&gt;&lt;BR /&gt;however you are now using: -&lt;BR /&gt;&lt;BR /&gt;for f in 'ls *.afi | sed 's/\.afi$//''&lt;BR /&gt;&lt;BR /&gt;Not the difference in quotes.  The very first and last quotes should be backquote ` (top-left of your keyboard).&lt;BR /&gt;&lt;BR /&gt;The awk solution suggested above will also work, however it will not take into account filenames with more than one "." in.</description>
      <pubDate>Wed, 01 Sep 2004 07:22:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/3369752#M713486</guid>
      <dc:creator>Simon Hargrave</dc:creator>
      <dc:date>2004-09-01T07:22:09Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/3369753#M713487</link>
      <description>Change the script to :&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;&lt;BR /&gt;set -x&lt;BR /&gt;&lt;BR /&gt;for f in $(ls -C1 *.afi | sed "s/\.afi$//")&lt;BR /&gt;do&lt;BR /&gt;echo $f&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Jean-Luc</description>
      <pubDate>Wed, 01 Sep 2004 07:27:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/3369753#M713487</guid>
      <dc:creator>Jean-Luc Oudart</dc:creator>
      <dc:date>2004-09-01T07:27:28Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/3369754#M713488</link>
      <description>I now understand the syntax.&lt;BR /&gt;Thanks for your help !&lt;BR /&gt;&lt;BR /&gt;Rene</description>
      <pubDate>Wed, 01 Sep 2004 08:02:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/3369754#M713488</guid>
      <dc:creator>Rene_17</dc:creator>
      <dc:date>2004-09-01T08:02:17Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/3369755#M713489</link>
      <description>You can do it easily with find command as,&lt;BR /&gt;&lt;BR /&gt;-- test.ksh --&lt;BR /&gt;afena $1 ~/tmp&lt;BR /&gt;--------------&lt;BR /&gt;&lt;BR /&gt;find &lt;DIR&gt; -name "*.afi" -exec ksh test.ksh {} \;&lt;BR /&gt;&lt;BR /&gt;Is afena a shell script function ?&lt;BR /&gt;&lt;BR /&gt;You can also do as,&lt;BR /&gt;&lt;BR /&gt;for FILE in $(ls *.afi|perl -pe 's/.afi$//)&lt;BR /&gt;do&lt;BR /&gt;  echo $FILE&lt;BR /&gt;done&lt;BR /&gt;&lt;/DIR&gt;</description>
      <pubDate>Wed, 01 Sep 2004 08:29:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/3369755#M713489</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2004-09-01T08:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/3369756#M713490</link>
      <description>Hi,&lt;BR /&gt;See if this works:&lt;BR /&gt;&lt;BR /&gt;# find ./ -name *.afi | cut -d "." -f 1 | xargs &lt;COMMAND to="" be="" executed=""&gt;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;/COMMAND&gt;</description>
      <pubDate>Sun, 05 Sep 2004 06:33:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/3369756#M713490</guid>
      <dc:creator>Bharat Katkar</dc:creator>
      <dc:date>2004-09-05T06:33:29Z</dc:date>
    </item>
  </channel>
</rss>

