If I use this command...
if ( $0 ~ /Test/ )
How do I set a variable to the $1 of this output. I've tried
var=$1
but this sets var to every $1 in my input - which is no good to me, I need to set var to $1 of the string returned by /Test/... Can I write some if statement to do this, I've tried arrays etc. but I still can't get this value out.... Thanks
if ( $0 ~ /Test/ )
How do I set a variable to the $1 of this output. I've tried
var=$1
but this sets var to every $1 in my input - which is no good to me, I need to set var to $1 of the string returned by /Test/... Can I write some if statement to do this, I've tried arrays etc. but I still can't get this value out.... Thanks