<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'><div dir='ltr'>
thanks ever so much Tet, that "QUOTING" bit fixed all the issues. <br><br>cheers<br>Ak<br><br><div>> To: gllug@gllug.org.uk<br>> From: sta296@astradyne.co.uk<br>> Date: Mon, 12 Sep 2011 09:38:28 +0100<br>> Subject: Re: [Gllug] issues with awk<br>> <br>> <br>> dudes dudes writes:<br>> <br>> >I have tried your approach before,doesn't return anything !<br>> <br>> Oops. I forgot the match needed to be a string:<br>> <br>> awk '$1=="'"$ip"'" {print}' test.txt<br>> <br>> >I don't understand why the variable doesn't get passed to awk !<br>> >(takes it as an empty string) !<br>> <br>> As Alain explained, the single quotes mean that the shell doesn't<br>> perform variable expansion. See the "QUOTING" secion of the bash<br>> man page.<br>> <br>> Tet<br>> --<br>> Gllug mailing list - Gllug@gllug.org.uk<br>> http://lists.gllug.org.uk/mailman/listinfo/gllug<br></div> </div></body>
</html>