<?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: Add strings in a shell to run a command in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/add-strings-in-a-shell-to-run-a-command/m-p/3952386#M97847</link>
    <description>Hi:&lt;BR /&gt;&lt;BR /&gt;# cat script.sh&lt;BR /&gt;#!/usr/bin/sh -x&lt;BR /&gt;comando="grep -e uno -e dos prueba.txt"&lt;BR /&gt;comando="${comando}|grep dos"&lt;BR /&gt;eval ${comando}&lt;BR /&gt;&lt;BR /&gt;# ./script.sh&lt;BR /&gt;/tmp/0227.sh     &lt;BR /&gt;+ comando=grep -e uno -e dos prueba.txt&lt;BR /&gt;+ comando=grep -e uno -e dos prueba.txt|grep dos&lt;BR /&gt;+ eval grep -e uno -e dos prueba.txt|grep dos&lt;BR /&gt;+ grep dos&lt;BR /&gt;+ grep -e uno -e dos prueba.txt&lt;BR /&gt;dos&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
    <pubDate>Tue, 27 Feb 2007 17:31:56 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2007-02-27T17:31:56Z</dc:date>
    <item>
      <title>Add strings in a shell to run a command</title>
      <link>https://community.hpe.com/t5/operating-system-linux/add-strings-in-a-shell-to-run-a-command/m-p/3952385#M97846</link>
      <description>Hello:&lt;BR /&gt;&lt;BR /&gt; I want to make the following:&lt;BR /&gt;&lt;BR /&gt;XXXX#cat script.sh&lt;BR /&gt;#!/usr/bin/sh -x&lt;BR /&gt;comando="grep -e uno -e dos prueba.txt"&lt;BR /&gt;comando="$comando |grep dos"&lt;BR /&gt;$comando&lt;BR /&gt;&lt;BR /&gt;XXX#cat prueba.txt&lt;BR /&gt;uno&lt;BR /&gt;dos&lt;BR /&gt;tres&lt;BR /&gt;cuatro&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;instead executing the command&lt;BR /&gt;grep -e uno -e dos prueba.txt|grep dos&lt;BR /&gt;&lt;BR /&gt;I obtain the following:&lt;BR /&gt;&lt;BR /&gt;XXX#./script.sh&lt;BR /&gt;+ comando=grep -e uno -e dos prueba.txt&lt;BR /&gt;+ comando=grep -e uno -e dos prueba.txt |grep dos&lt;BR /&gt;+ grep -e uno -e dos prueba.txt |grep dos&lt;BR /&gt;prueba.txt:uno&lt;BR /&gt;prueba.txt:dos&lt;BR /&gt;grep: can't open |grep&lt;BR /&gt;grep: can't open dos&lt;BR /&gt;&lt;BR /&gt;Any ideas?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 27 Feb 2007 17:17:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/add-strings-in-a-shell-to-run-a-command/m-p/3952385#M97846</guid>
      <dc:creator>Mario_88</dc:creator>
      <dc:date>2007-02-27T17:17:21Z</dc:date>
    </item>
    <item>
      <title>Re: Add strings in a shell to run a command</title>
      <link>https://community.hpe.com/t5/operating-system-linux/add-strings-in-a-shell-to-run-a-command/m-p/3952386#M97847</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;# cat script.sh&lt;BR /&gt;#!/usr/bin/sh -x&lt;BR /&gt;comando="grep -e uno -e dos prueba.txt"&lt;BR /&gt;comando="${comando}|grep dos"&lt;BR /&gt;eval ${comando}&lt;BR /&gt;&lt;BR /&gt;# ./script.sh&lt;BR /&gt;/tmp/0227.sh     &lt;BR /&gt;+ comando=grep -e uno -e dos prueba.txt&lt;BR /&gt;+ comando=grep -e uno -e dos prueba.txt|grep dos&lt;BR /&gt;+ eval grep -e uno -e dos prueba.txt|grep dos&lt;BR /&gt;+ grep dos&lt;BR /&gt;+ grep -e uno -e dos prueba.txt&lt;BR /&gt;dos&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 27 Feb 2007 17:31:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/add-strings-in-a-shell-to-run-a-command/m-p/3952386#M97847</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-02-27T17:31:56Z</dc:date>
    </item>
    <item>
      <title>Re: Add strings in a shell to run a command</title>
      <link>https://community.hpe.com/t5/operating-system-linux/add-strings-in-a-shell-to-run-a-command/m-p/3952387#M97848</link>
      <description>Thanks.</description>
      <pubDate>Tue, 27 Feb 2007 17:59:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/add-strings-in-a-shell-to-run-a-command/m-p/3952387#M97848</guid>
      <dc:creator>Mario_88</dc:creator>
      <dc:date>2007-02-27T17:59:45Z</dc:date>
    </item>
  </channel>
</rss>

