#!/bin/bashregs = $(./acme.sh | sed 's/untrusted/\nuntrusted/' | sed '/^[ \t].$/d' | grep untrusted20 | wc -l);echo "Statistic:$regs /n";exit 0;
i get this error. im not the best with bash scripts.
Not on my Linux box right now so unfortunately I can't do any testing, but off the bat I'd remove the white space from around the equal sign.
Also, from what it looks like, you are expecting to have 'untrusted' possibly show up multiple times per line. You'll want to change the first sed to this:
sed 's/untrusted/\nuntrusted/g'
What was the reason for the second sed command? It looks like you are wanting to remove any lines with white space at the beginning, but between the first sed and the grep all of the lines that have 'untrusted20' should start with 'untrusted' with no preceding whitespace.
Have you verified that 'acme.sh' exists in the working directory that is listed for Solarwinds?