Nov 8, 2002 #1 lambros Programmer Oct 10, 2002 42 US Hi all, is the following syntax correct in awk - I wish to test if the line $0 matches the test /invalid credentials/ but does not match the variable /test/? if($0 ~ /Invalid credentials/ !~ /test/){ print $0 } Lambros.
Hi all, is the following syntax correct in awk - I wish to test if the line $0 matches the test /invalid credentials/ but does not match the variable /test/? if($0 ~ /Invalid credentials/ !~ /test/){ print $0 } Lambros.
Nov 8, 2002 #2 CaKiwi Programmer Apr 8, 2001 1,294 US Depending on what you mean by "match the variable test", this may do what you want. if($0 ~ /Invalid credentials/ && $0 !~ /test/){ CaKiwi Upvote 0 Downvote
Depending on what you mean by "match the variable test", this may do what you want. if($0 ~ /Invalid credentials/ && $0 !~ /test/){ CaKiwi
Nov 8, 2002 #3 vgersh99 Programmer Jul 27, 2000 2,146 US 'test' is a variable (I think): if($0 ~ /Invalid credentials/ && $0 !~ test){ vlad +---------------------------+ |#include<disclaimer.h> | +---------------------------+ Upvote 0 Downvote
'test' is a variable (I think): if($0 ~ /Invalid credentials/ && $0 !~ test){ vlad +---------------------------+ |#include<disclaimer.h> | +---------------------------+