filter command syntax
Posted: Thu Mar 13, 2014 1:48 am
Help! What is wrong with my syntax in using the filter command in these two instances?
filter VarOne with VarTwo
VarOne is a variable containing lines of tab-delimited text, including some lines that contain the string that's stored in the VarTwo variable? After the command above VarOne is always empty even though, seems to me, it shouldn't be.
filter field "test field" with varTwo
Same result. field 'test field" contains the same data as in the first attempt to use filter above. The command filters field "test field" to empty even though the string in varTwo most definitely occurs on some of the lines.
What is wrong? I've written some scripts in which the filter command works as intended, but in many other instances I've had to resort to running through the data line by line and deleting any lines that don't contain the intended string. A less elegant approach; at least I can get it to work. Any suggestions?
Thanks in advance,
Sieg
filter VarOne with VarTwo
VarOne is a variable containing lines of tab-delimited text, including some lines that contain the string that's stored in the VarTwo variable? After the command above VarOne is always empty even though, seems to me, it shouldn't be.
filter field "test field" with varTwo
Same result. field 'test field" contains the same data as in the first attempt to use filter above. The command filters field "test field" to empty even though the string in varTwo most definitely occurs on some of the lines.
What is wrong? I've written some scripts in which the filter command works as intended, but in many other instances I've had to resort to running through the data line by line and deleting any lines that don't contain the intended string. A less elegant approach; at least I can get it to work. Any suggestions?
Thanks in advance,
Sieg