<?xml version='1.0' encoding='ISO-8859-1'?>
     <rss version='2.0'>
      <channel>
       <title>foreach_igracki.lha utility/misc - Comments</title>
       <link>http://se.os4depot.net/?function=comments&amp;file=utility/misc/foreach_igracki.lha</link>
       <description>Execute a command for every argument</description>
       <language>en-gb</language>
       <lastBuildDate>Wed, 08 Apr 2026 12:51:06 +0200</lastBuildDate>
       <image>
        <title>OS4Depot.net</title>
        <url>http://se.os4depot.net/images/rss.gif</url>
        <link>http://se.os4depot.net</link>
       </image><item> <title>Severin (91.125.91.55) @ 07 Aug 2013, 12:49.20</title> <link>http://se.os4depot.net/?function=comments&amp;file=utility/misc/foreach_igracki.lha</link> <description>&lt;STRONG&gt;By:&lt;/STRONG&gt;&amp;nbsp;Severin (91.125.91.55)&lt;BR /&gt;&lt;pre&gt;I tried Foreach tonight and would like to be able to use %s at least twice in the command for redireting the output from a program that just dumps data to the shell eg. 
 
Foreach FILE &quot;#?.jpg&quot; DO &quot;djpeg -scale 1/8 %s &gt;ram:%s&quot; 
 
gives: 
 
NIL::1: djpeg: unable to open redirection file 
NIL::1: djpeg failed returncode 10 
 
with verbose on I get: 
 
&gt; Foreach FILE &quot;#?.jpg&quot; DO &quot;djpeg -scale 1/8 %s &gt;ram:%s&quot; verbose 
0. cmd = &quot;djpeg -scale 1/8 8033.jpg &gt;ram:&quot; 
NIL::1: djpeg: unable to open redirection file 
NIL::1: djpeg failed returncode 10 
 
It would be far easier than doing; 
 
list #?.jpg lformat &quot;djpeg -scale 1/8 *&quot;%N*&quot; &gt;*&quot;ram:%N*&quot;&quot; to pipe: | execute pipe: 
 
all the time... 
&lt;/pre&gt;</description> <guid isPermaLink='false'>1375829360</guid> <pubDate>Wed, 07 Aug 2013 00:49:20 +0200</pubDate></item></channel> </rss>