Ethereal-users: Re: [Ethereal-users] shell variable in tethereal display filter

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

Date: Tue, 27 Sep 2005 20:12:26 +0200
man sh

... you are using single quotes (whose contents are not evalated by
the shell) try using double quotes.

tethereal -r $CAPTURE_FILE -z sip,stat,"ip.src==$IP_SRC"

or

tethereal -r $CAPTURE_FILE -z sip,stat,'ip.src=='$IP_SRC

or again
tethereal -r $CAPTURE_FILE -z sip,stat,ip.src==$IP_SRC

(there should not be spaces in $IP_SRC)


On 9/27/05, jlee@xxxxxxxxxxxxxxx <jlee@xxxxxxxxxxxxxxx> wrote:
> Hi –
>
> I am using tethereal in a shell script to filter a capture file. I would like to use a shell variable as part of the display filter, as in the following:
>
> IP_SRC= xxx.xxx.xxx.xx
> ....
> tethereal -r $CAPTURE_FILE -z sip,stat,'ip.src==$IP_SRC'
>
> When I run the script the value for $IP_SRC is not substituted correctly in the filter.
>
> Is there a correct syntax for using a variable in the filer string?
>
> Thanks
> JLee
>
>
>
>
> _______________________________________________
> Ethereal-users mailing list
> Ethereal-users@xxxxxxxxxxxx
> http://www.ethereal.com/mailman/listinfo/ethereal-users
>


--
This information is top security. When you have read it, destroy yourself.
-- Marshall McLuhan