Passing a variable as an argument for tshark command line


Hi, all, I want to use tshark command for analyzing some captured packets
the command line is as follows:

  tshark -R  ${filter}  -T fields -E separator="," -e frame.time_relative -e t
cp.seq -e tcp.len -e frame.len -r captured.pcap

where “filter” is a variable
if I use ${filter} or $filter
it will prompts
tshark: Read filters were specified both with “-R” and with additio
nal command-line arguments

while if I use “${filter}” or “echo $filter” , it leads to
tshark: Syntax error near “ip.src”

is anybody here who can help me with this?