| delorie.com/archives/browse.cgi | search |
| X-Spam-Check-By: | sourceware.org |
| To: | cygwin AT cygwin DOT com |
| From: | Kevin Markle <kmarkle AT pbs DOT org> |
| Subject: | Re: grep will not work with a variable? |
| Date: | Thu, 29 Mar 2007 15:39:33 -0400 |
| Lines: | 20 |
| Message-ID: | <mn.ebab7d7390ec83d9.51129@pbs.org> |
| References: | <mn DOT eb517d73f1140792 DOT 51129 AT pbs DOT org> <460C1525 DOT 8060305 AT yahoo DOT com> |
| Reply-To: | kmarkle AT pbs DOT org |
| Mime-Version: | 1.0 |
| X-IsSubscribed: | yes |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
Keith Christian brought next idea :
> Kevin Markle wrote:
>> Hello,
>>
>> I'm trying to find a pattern in a file and the command works if I manully
>> put the output of the variable in it but when I use the variable it fails?
>> I have tryed with quotes "$CLIENT" and without. I don't know what else to
>> try? :-(
>
> echo "Client variable is --> \"${CLIENT}\"" ; grep "${CLIENT}" foo.txt
>
> What does that tell you?
>
> ========Keith
I tryed adding a cd to the directory that I was attempting to grep from
and that worked? This is okay because is worked but it would be nice to
not have to so that...
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |