Hello:
I want to make the following
XXX:#cat prueba.txt
uno
dos
tres
cuatro
---------
#!/usr/bin/sh -x
comando="grep -e uno -e dos prueba.txt"
comando="$comando |grep dos"
$comando
----------------
but instead executing the comand
grep -e uno -e dos prubea.txt|grep dos
I obtain the following:
-----------------------------------
+ comando=grep -e uno -e dos prueba.txt
+ comando=grep -e uno -e dos prueba.txt |grep dos
+ grep -e uno -e dos prueba.txt |grep dos
prueba.txt:uno
prueba.txt:dos
grep: can't open |grep
grep: can't open dos
-----------------
Any ideas
I want to make the following
XXX:#cat prueba.txt
uno
dos
tres
cuatro
---------
#!/usr/bin/sh -x
comando="grep -e uno -e dos prueba.txt"
comando="$comando |grep dos"
$comando
----------------
but instead executing the comand
grep -e uno -e dos prubea.txt|grep dos
I obtain the following:
-----------------------------------
+ comando=grep -e uno -e dos prueba.txt
+ comando=grep -e uno -e dos prueba.txt |grep dos
+ grep -e uno -e dos prueba.txt |grep dos
prueba.txt:uno
prueba.txt:dos
grep: can't open |grep
grep: can't open dos
-----------------
Any ideas