Re: bash variables
On Fri, 25 Feb 2011 14:21:27 -0800, Mike McClain wrote:
> the following command lists (along with everything else)
> 2 *.deb files in /home/mike/
>
> root@/deb40a:~> FIND1="-maxdepth 1 -type f -print -name '*'"; \
> GREP="-v '\.\(deb\|gz\|tgz\|bz2\|tbz\|zip\)$'"; \ find /home/mike/
> $FIND1 | grep $GREP ;
>
> while without variables;
> root@/deb40a:~> find /home/mike/ -maxdepth 1 -type f -print -name '*' |
> grep -v '\.\(deb\|gz\|tgz\|bz2\|tbz\|zip\)$'
> does not list the 2 *.deb files.
Shouldn't be. Are you sure you are posting exactly as what you are doing
without omitting anything else?
--
Tong (remove underscore(s) to reply)
http://xpt.sourceforge.net/techdocs/
http://xpt.sourceforge.net/tools/
Reply to: