[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

grep not recognizing a variable when searching

From: McCracken, Mark
Subject: grep not recognizing a variable when searching
Date: Mon, 05 Jul 2004 11:16:40 -0300

I have defined a variable and then I am trying to search for the variable in
a file.


set abc = `cat file`

set i = 1

grep $abc[$i] file2


A status of 1 is returned.


The above works for me on UNIX, is there another way I should be doing this
for Cygwin?


Thanks for any help.





Mark McCracken

Canadian Hydro graphic Service/Service Hydrographique du Canada

Bedford Institute of Oceanography/Institut Océanographique de Bedford

P.O. Box 1006 Dartmouth, NS. Canada B2Y 4A2/C.P. 1006 Dartmouth, N-É Canada
B2Y 4A2

* < <mailto:address@hidden>
mailto:address@hidden>> * Phone: 902-426-9858 * Fax / Telec:


reply via email to

[Prev in Thread] Current Thread [Next in Thread]