<?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: Command Line syntax question in Cortex XSOAR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/command-line-syntax-question/m-p/595429#M3558</link>
    <description>&lt;P&gt;In completion to the&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/1642463509"&gt;@John374McCray&lt;/a&gt;&amp;nbsp;answer, you can use the extend-context parameter to ensure your context path is specific to that command (in case you use getList twice for example) :&amp;nbsp;&lt;A href="https://xsoar.pan.dev/docs/playbooks/playbooks-extend-context" target="_blank"&gt;https://xsoar.pan.dev/docs/playbooks/playbooks-extend-context&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 21 Aug 2024 06:30:36 GMT</pubDate>
    <dc:creator>gcariou</dc:creator>
    <dc:date>2024-08-21T06:30:36Z</dc:date>
    <item>
      <title>Command Line syntax question</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/command-line-syntax-question/m-p/595389#M3554</link>
      <description>&lt;P&gt;How do I combine commands on the #XSOAR command line?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If one command wants a list, I would like to call a list, not enumerate it on the command line.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, the RandomElementFromList works like this:&lt;/P&gt;
&lt;P&gt;!RandomElementFromList count=1 value="banana, orange, potato" may randomly respond with "orange".&amp;nbsp; Easy Peazy.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;getList works like this:&lt;BR /&gt;!getList listName=fruitAndVegatables will respond with the entire list.&amp;nbsp; Nice.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What if I have a long list named fruitAndVegatables stored and I want a compound command that will pick a value by combining the randomElementFromList command and the getList command? What is the syntax?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My guess is this, but it doesn't work:&lt;/P&gt;
&lt;P&gt;!RandomElementFromList count=1 value=!getList listName=fruitAndVegatables&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What combination of quotes, curly brackets and delimiters do I need? I am interested in the syntax.&amp;nbsp; I did not see a relevant example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2024 20:19:23 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/command-line-syntax-question/m-p/595389#M3554</guid>
      <dc:creator>BRowe_23</dc:creator>
      <dc:date>2024-08-20T20:19:23Z</dc:date>
    </item>
    <item>
      <title>Re: Command Line syntax question</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/command-line-syntax-question/m-p/595429#M3558</link>
      <description>&lt;P&gt;In completion to the&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/1642463509"&gt;@John374McCray&lt;/a&gt;&amp;nbsp;answer, you can use the extend-context parameter to ensure your context path is specific to that command (in case you use getList twice for example) :&amp;nbsp;&lt;A href="https://xsoar.pan.dev/docs/playbooks/playbooks-extend-context" target="_blank"&gt;https://xsoar.pan.dev/docs/playbooks/playbooks-extend-context&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2024 06:30:36 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/command-line-syntax-question/m-p/595429#M3558</guid>
      <dc:creator>gcariou</dc:creator>
      <dc:date>2024-08-21T06:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: Command Line syntax question</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/command-line-syntax-question/m-p/595439#M3559</link>
      <description>&lt;P&gt;Hey there,&lt;BR /&gt;&lt;BR /&gt;just adding and summarizing what the other folks already shared....&lt;BR /&gt;&lt;BR /&gt;The idea of running an a command within a command is not really forseen by XSOAR, I know you can do some magic with dt&amp;nbsp;&lt;A href="https://xsoar.pan.dev/docs/integrations/dt" target="_blank"&gt;https://xsoar.pan.dev/docs/integrations/dt&lt;/A&gt;&amp;nbsp;but not to the extend you are looking for.&lt;BR /&gt;&lt;BR /&gt;So the best way forward is using the Context and keep manipulating it, basically running the commands in sequence&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;!getList listName=fruitAndVegatables extend-context=mylist&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;!RandomElementFromList count=1 value=${mylist}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;or something along those lines &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2024 08:00:04 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/command-line-syntax-question/m-p/595439#M3559</guid>
      <dc:creator>JStephan</dc:creator>
      <dc:date>2024-08-21T08:00:04Z</dc:date>
    </item>
    <item>
      <title>Re: Command Line syntax question</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/command-line-syntax-question/m-p/595615#M3564</link>
      <description>&lt;P&gt;Its all about the Context.&amp;nbsp; Im starting to see that now.&amp;nbsp; Its like a giant collection of global variables.&amp;nbsp; Thanks for the help.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2024 12:48:29 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/command-line-syntax-question/m-p/595615#M3564</guid>
      <dc:creator>BRowe_23</dc:creator>
      <dc:date>2024-08-22T12:48:29Z</dc:date>
    </item>
  </channel>
</rss>

