Unix question

Brian K. White brian at aljex.com
Fri Apr 16 11:02:44 PDT 2004


George Simon wrote:
> So, why did it work?

See my other post that I accidentally sent to ken private.
The first line explains that. The rest points out the other possibilities.

>
> George Simon (IT Department)
> American River Logistics, LTD
> 614 Progress St.
> Elizabeth, NJ  07205
> Phone:(908)354-7746      Fax:(908)354-7491
> mailto:george at worldest.com
> http://www.americanriverintl.com/
>
>
>
> -----Original Message-----
> From: Kenneth Brody [mailto:kenbrody at bestweb.net]
> Sent: Friday, April 16, 2004 12:09 PM
> To: George Simon
> Cc: filePro mailing List
> Subject: Re: Unix question
>
> (Top-posting and improper quoting corrected.)
>
>
>>>> Thanks.
>>>> The quotes were not necessary.  Ken's example worked perfectly.
>>>> I was trying to look for the string rctp(54)=
>>>> The \ is a escape character (just like in filePro) to tell grep (I
>>>> guess) that the (  and  ) are part of the string being searched,
>>> [...]
>>>>>       grep  rcpt\(54\)= prc.*
>>> [...]
>>>
>>> If that was your intent, it didn't do what you wanted, since the
>>> shell sees them first. You need to double them to get one passed
>>> to the program.
>>
>> Double what?
>> I wanted: rcpt(54)=
>> I used the example you gave me and it worked perfectly.
>> I don't need to see the \
>> Am I missing something?
>
> You said that the backslashes were "to tell grep that the ( and ) are
> part of the string being searched".  With the command you wrote, grep
> will never see the backslashes, as they will be eaten by the shell.
> If your intention were to pass backslashes to grep, you would have
> had to double the backslashes.  As written, it is the shell that you
> are telling to pass the parens to grep, rather than having the shell
> give them special meaning.  (Or, just put it in quotes, and leave the
> backslashes off.)
>
>> Kenneth J. Brody        | www.hvcomputer.com |
>>
>> kenbrody at spamcop.net | www.fptech.com     | #include
>> <std_disclaimer.h>
>>
>
+-------------------------+--------------------+----------------------------
> -+
>
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> http://mailman.celestial.com/mailman/listinfo/filepro-list



More information about the Filepro-list mailing list