Hi,
My purpose is to compare the output of two commands with diff. I am trying to do this by assigning the two commands to two variables wherafter I use the variables with diff. Please let me know if I should use another approach to achieve my goal, I am new to bash programming.
The problem I have run into is that I have tried to assign a for loop to a variable like this:
Code:
name="for i in unzip; do dpkg -L $i; done"
but I get the next error when I do "$name":
Code:
-bash: for i in unzip ; do dpkg -L ; done: command not found
Can someone show me what I am doing wrong?
Thanks for your help.
Ben