grep will not work with a variable?

Kevin Markle kmarkle@pbs.org
Thu Mar 29 21:12:00 GMT 2007


It happens that Gary Johnson formulated :
> On 2007-03-29, Kevin Markle wrote:
>> Gary Johnson used his keyboard to write :
>>> On 2007-03-29, 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? :-(
>>> 
>>> What do you get if you execute
>>> 
>>>     echo '|'"$CLIENT"'|'
>>> 
>>> I just put those '|' there to more clearly delimit the value of 
>>> CLIENT.
>>> 
>>> Gary
>> 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...
>
> You didn't say anything about a cd or directories in your original 
> question.  If you are still having difficulties, or just don't want 
> to have to do whatever it is you're having to do, we can probably 
> help.  However, it would help us to help you if you would describe 
> precisely what it is you are trying to do and describe precisely 
> (with examples) of what happens when it doesn't work.  See
>
>     http://cygwin.com/problems.html
>
> Regards,
> Gary

Sorry about 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/



More information about the Cygwin mailing list