Because storing the result in a shell variable always strings out redundant white space.
If you want newlines, then pipe it direct.
tripViolations=$($tripwire --check --quiet | awk '/Total violations found/ {print $4}')
Reputation Points: 5862
Solved Threads: 950
Posting Sage
Offline 7,164 posts
since Dec 2005