<?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: using asterisk in system commands? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/using-asterisk-in-system-commands/m-p/502787#M134274</link>
    <description>&lt;P&gt;Thanks for the prompt responses, &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt; and &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;!&lt;/P&gt;</description>
    <pubDate>Tue, 09 Oct 2018 16:29:32 GMT</pubDate>
    <dc:creator>paulkaefer</dc:creator>
    <dc:date>2018-10-09T16:29:32Z</dc:date>
    <item>
      <title>using asterisk in system commands?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/using-asterisk-in-system-commands/m-p/502753#M134260</link>
      <description>&lt;P&gt;I'm trying to write a macro function that will remove all files matching a pattern in a folder.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's what I've got so far:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro rm_bak(dir=);
    x rm "&amp;amp;dir./*.bak";
%mend;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This doesn't work because no files match the string literal ".../*.bak". However, if I remove the quotes, the *...; is treated as a comment (as expected). Is there a way to escape an *? I've tried %str, to no effect.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2018 15:27:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/using-asterisk-in-system-commands/m-p/502753#M134260</guid>
      <dc:creator>paulkaefer</dc:creator>
      <dc:date>2018-10-09T15:27:03Z</dc:date>
    </item>
    <item>
      <title>Re: using asterisk in system commands?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/using-asterisk-in-system-commands/m-p/502758#M134263</link>
      <description>Instead of X try SYSEXEC or CALL SYSTEM. I find I avoid quoting issues when using either of those instead of X.</description>
      <pubDate>Tue, 09 Oct 2018 15:33:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/using-asterisk-in-system-commands/m-p/502758#M134263</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-10-09T15:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: using asterisk in system commands?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/using-asterisk-in-system-commands/m-p/502769#M134267</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename oscmd pipe "rm '&amp;amp;dir./*.bak' 2&amp;gt;&amp;amp;1";

data _null_;
infile oscmd;
input;
put _infile_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and inspect the log.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2018 15:46:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/using-asterisk-in-system-commands/m-p/502769#M134267</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-10-09T15:46:16Z</dc:date>
    </item>
    <item>
      <title>Re: using asterisk in system commands?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/using-asterisk-in-system-commands/m-p/502787#M134274</link>
      <description>&lt;P&gt;Thanks for the prompt responses, &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt; and &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;!&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2018 16:29:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/using-asterisk-in-system-commands/m-p/502787#M134274</guid>
      <dc:creator>paulkaefer</dc:creator>
      <dc:date>2018-10-09T16:29:32Z</dc:date>
    </item>
  </channel>
</rss>

