<?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: PIPE Command Using Linux Path with Spaces in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PIPE-Command-Using-Linux-Path-with-Spaces/m-p/563885#M158118</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/216466"&gt;@shl007&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I am struggling with is code to use in my PIPE command when my linux directory has spaces. I see various posts on SAS community that say to surround the path in double quotes, which I am doing. But I still get a path not found error. This is what I have for it. Any ideas? I am pulling my hair out on this &lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;. I have tested the code below with a path without spaces, and it works. With spaces seems to be the issue. Thanks for any tips you can provide!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;filename test pipe 'ls -a "/my path with spaces"';&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ERROR: Physical file does not exist, /sso/biconfig/940/Lev1/SASApp/ls: cannot access&lt;/P&gt;
&lt;P&gt;: No such file or directory.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The error message you posted makes it look like you forgot the PIPE engine since it looks like it is taking the ls as the filename.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you sure the path actually exists?&amp;nbsp; Try just creating a fileref that points to that directory and see if it find the path.&amp;nbsp; Or try using this macro to test if the directory exists:&amp;nbsp;&amp;nbsp;&lt;A href="https://github.com/sasutils/macros/blob/master/direxist.sas" target="_blank"&gt;https://github.com/sasutils/macros/blob/master/direxist.sas&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could also try using Unix escape character (backslash) to protect the spaces.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename test pipe 'ls -a /my\ path\ with\ spaces';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Jun 2019 20:35:44 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2019-06-05T20:35:44Z</dc:date>
    <item>
      <title>PIPE Command Using Linux Path with Spaces</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PIPE-Command-Using-Linux-Path-with-Spaces/m-p/563826#M158095</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I am struggling with is code to use in my PIPE command when my linux directory has spaces. I see various posts on SAS community that say to surround the path in double quotes, which I am doing. But I still get a path not found error. This is what I have for it. Any ideas? I am pulling my hair out on this &lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;. I have tested the code below with a path without spaces, and it works. With spaces seems to be the issue. Thanks for any tips you can provide!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;filename test pipe 'ls -a "/my path with spaces"';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR: Physical file does not exist, /sso/biconfig/940/Lev1/SASApp/ls: cannot access&lt;/P&gt;&lt;P&gt;: No such file or directory.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 18:45:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PIPE-Command-Using-Linux-Path-with-Spaces/m-p/563826#M158095</guid>
      <dc:creator>shl007</dc:creator>
      <dc:date>2019-06-05T18:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: PIPE Command Using Linux Path with Spaces</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PIPE-Command-Using-Linux-Path-with-Spaces/m-p/563885#M158118</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/216466"&gt;@shl007&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I am struggling with is code to use in my PIPE command when my linux directory has spaces. I see various posts on SAS community that say to surround the path in double quotes, which I am doing. But I still get a path not found error. This is what I have for it. Any ideas? I am pulling my hair out on this &lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;. I have tested the code below with a path without spaces, and it works. With spaces seems to be the issue. Thanks for any tips you can provide!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;filename test pipe 'ls -a "/my path with spaces"';&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ERROR: Physical file does not exist, /sso/biconfig/940/Lev1/SASApp/ls: cannot access&lt;/P&gt;
&lt;P&gt;: No such file or directory.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The error message you posted makes it look like you forgot the PIPE engine since it looks like it is taking the ls as the filename.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you sure the path actually exists?&amp;nbsp; Try just creating a fileref that points to that directory and see if it find the path.&amp;nbsp; Or try using this macro to test if the directory exists:&amp;nbsp;&amp;nbsp;&lt;A href="https://github.com/sasutils/macros/blob/master/direxist.sas" target="_blank"&gt;https://github.com/sasutils/macros/blob/master/direxist.sas&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could also try using Unix escape character (backslash) to protect the spaces.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename test pipe 'ls -a /my\ path\ with\ spaces';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 20:35:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PIPE-Command-Using-Linux-Path-with-Spaces/m-p/563885#M158118</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-06-05T20:35:44Z</dc:date>
    </item>
  </channel>
</rss>

