On Sat, May 1, 2010 at 8:49 PM, Shakthi Kannan <[email protected]>wrote:
> Hi, > > --- On Sat, May 1, 2010 at 8:30 PM, narendra sisodiya > <[email protected]> wrote: > | ___ NO, Its not working, ______ > | > | run this > | $ dpkg -L bzr | grep icon > | > | and then run this > | $ INPUT_COMMAND="dpkg -L bzr" > | $ PROCESS_COMMAND="echo -e" > | $ for line in `$INPUT_COMMAND`; do $PROCESS_COMMAND $line; done | grep > icon > \-- > > Well, your "grep icon" should be part of the INPUT_COMMAND. Why do you > put it in the for statement? > > You can invoke individual commands of a shell script, but, when you > use variables as long as you are in the current session you should be > fine, otherwise you need to export them! > > Please tweak the shell script to your needs, and run it as a shell script! > > even if you remove ' | grep icon' , output of both are different Try saving output in file and then run diff command. if you look at terminal , both output will appear to be same. -- ┌─────────────────────────┐ │ Narendra Sisodiya ( नरेन्द्र सिसोदिया ) │ Society for Knowledge Commons │ Web : http://narendra.techfandu.org └─────────────────────────┘ -- l...@iitd - http://tinyurl.com/ycueutm
