<?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 Running multiple Unix commands via pipe operator using tSystem in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Running-multiple-Unix-commands-via-pipe-operator-using-tSystem/m-p/2238192#M26388</link>
    <description>Hi, 
&lt;BR /&gt;I'm trying to automate file-encryption using gpg encryption (password being passed automatically). 
&lt;BR /&gt;On Unix, the command to do so is: 
&lt;BR /&gt;(a) echo &amp;lt;password&amp;gt; | gpg --batch -q --passphrase-fd 0 --symmetric --armor -c &amp;lt;file-to-encrypt&amp;gt; 
&lt;BR /&gt;OR, if the password is in a file (say, passFile.txt), then: 
&lt;BR /&gt;(b) cat passFile.txt | gpg --batch -q --passphrase-fd 0 --symmetric --armor -c &amp;lt;file-to-encrypt&amp;gt; 
&lt;BR /&gt;I'm using tSystem component to call these commands. 
&lt;BR /&gt;So on Windows I'm using "cmd /c echo qwerty | gpg --batch -q --passphrase-fd 0 --symmetric --armor -c BB1.txt" which is working perfectly fine. 
&lt;BR /&gt;However, on Unix I've tries several ways but unable to get the desired result. 
&lt;BR /&gt;I've tried giving following in the tSystem: 
&lt;BR /&gt;(a) "echo qwerty | gpg --batch -q --passphrase-fd 0 --symmetric --armor -c BB1.txt" 
&lt;BR /&gt;-------------------- 
&lt;BR /&gt;Result: It simply prints out the foll. on the console without doing anything: 
&lt;BR /&gt;qwerty | gpg --batch -q --passphrase-fd 0 --symmetric --armor -c BB1.txt 
&lt;BR /&gt; 
&lt;BR /&gt;(b) "cat passFile.txt | gpg --batch -q --passphrase-fd 0 --symmetric --armor -c &amp;lt;file-to-encrypt&amp;gt;" 
&lt;BR /&gt;------------------------- 
&lt;BR /&gt;Result: 
&lt;BR /&gt;qwerty 
&lt;BR /&gt;cat: cannot open | 
&lt;BR /&gt;cat: cannot open gpg 
&lt;BR /&gt;cat: cannot open --batch 
&lt;BR /&gt;cat: cannot open -q 
&lt;BR /&gt;cat: cannot open --passphrase-fd 
&lt;BR /&gt;cat: cannot open 0 
&lt;BR /&gt;cat: cannot open --symmetric 
&lt;BR /&gt;cat: cannot open --armor 
&lt;BR /&gt;cat: cannot open -c 
&lt;BR /&gt;&amp;lt;file-contents are displayed&amp;gt; 
&lt;BR /&gt; 
&lt;BR /&gt;I've been trying hard to figure out other ways by providing "exec" and by enclosing the command within `, but none of them have worked. 
&lt;BR /&gt;Can someone please advise? 
&lt;BR /&gt;Regards 
&lt;BR /&gt;Kshitij</description>
    <pubDate>Sat, 16 Nov 2024 13:07:46 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T13:07:46Z</dc:date>
    <item>
      <title>Running multiple Unix commands via pipe operator using tSystem</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Running-multiple-Unix-commands-via-pipe-operator-using-tSystem/m-p/2238192#M26388</link>
      <description>Hi, 
&lt;BR /&gt;I'm trying to automate file-encryption using gpg encryption (password being passed automatically). 
&lt;BR /&gt;On Unix, the command to do so is: 
&lt;BR /&gt;(a) echo &amp;lt;password&amp;gt; | gpg --batch -q --passphrase-fd 0 --symmetric --armor -c &amp;lt;file-to-encrypt&amp;gt; 
&lt;BR /&gt;OR, if the password is in a file (say, passFile.txt), then: 
&lt;BR /&gt;(b) cat passFile.txt | gpg --batch -q --passphrase-fd 0 --symmetric --armor -c &amp;lt;file-to-encrypt&amp;gt; 
&lt;BR /&gt;I'm using tSystem component to call these commands. 
&lt;BR /&gt;So on Windows I'm using "cmd /c echo qwerty | gpg --batch -q --passphrase-fd 0 --symmetric --armor -c BB1.txt" which is working perfectly fine. 
&lt;BR /&gt;However, on Unix I've tries several ways but unable to get the desired result. 
&lt;BR /&gt;I've tried giving following in the tSystem: 
&lt;BR /&gt;(a) "echo qwerty | gpg --batch -q --passphrase-fd 0 --symmetric --armor -c BB1.txt" 
&lt;BR /&gt;-------------------- 
&lt;BR /&gt;Result: It simply prints out the foll. on the console without doing anything: 
&lt;BR /&gt;qwerty | gpg --batch -q --passphrase-fd 0 --symmetric --armor -c BB1.txt 
&lt;BR /&gt; 
&lt;BR /&gt;(b) "cat passFile.txt | gpg --batch -q --passphrase-fd 0 --symmetric --armor -c &amp;lt;file-to-encrypt&amp;gt;" 
&lt;BR /&gt;------------------------- 
&lt;BR /&gt;Result: 
&lt;BR /&gt;qwerty 
&lt;BR /&gt;cat: cannot open | 
&lt;BR /&gt;cat: cannot open gpg 
&lt;BR /&gt;cat: cannot open --batch 
&lt;BR /&gt;cat: cannot open -q 
&lt;BR /&gt;cat: cannot open --passphrase-fd 
&lt;BR /&gt;cat: cannot open 0 
&lt;BR /&gt;cat: cannot open --symmetric 
&lt;BR /&gt;cat: cannot open --armor 
&lt;BR /&gt;cat: cannot open -c 
&lt;BR /&gt;&amp;lt;file-contents are displayed&amp;gt; 
&lt;BR /&gt; 
&lt;BR /&gt;I've been trying hard to figure out other ways by providing "exec" and by enclosing the command within `, but none of them have worked. 
&lt;BR /&gt;Can someone please advise? 
&lt;BR /&gt;Regards 
&lt;BR /&gt;Kshitij</description>
      <pubDate>Sat, 16 Nov 2024 13:07:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Running-multiple-Unix-commands-via-pipe-operator-using-tSystem/m-p/2238192#M26388</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T13:07:46Z</dc:date>
    </item>
    <item>
      <title>Re: Running multiple Unix commands via pipe operator using tSystem</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Running-multiple-Unix-commands-via-pipe-operator-using-tSystem/m-p/2238193#M26389</link>
      <description>Create a simple and single script file, with all the command that you want to execute, and then invoke it in tsystem.&lt;BR /&gt;tsystem is not a shell enviroment, it just spawn a process.</description>
      <pubDate>Sun, 23 Jan 2011 11:42:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Running-multiple-Unix-commands-via-pipe-operator-using-tSystem/m-p/2238193#M26389</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-01-23T11:42:59Z</dc:date>
    </item>
  </channel>
</rss>

