set output into variable from grep from input variable
-1
votes
2
answers
73
views
whats wrong with this bash script:
acme2=$(dig txt @$1 _acme-challenge.$1.de)
acme3=$(echo $acme2 | grep "^_acme")
acme2 has the whole output, but
acme3 is always empty
I searched several solutions, and tried other possibilities, but nothing works...
acme3=echo $acme2|grep acme
acme3=$($acme2|grep "^_acme")
acme3=$(grep "acme" $acme2)
acme3=$(echo "$acme2" | grep "^_acme")
Asked by dg1kpc
(1 rep)
Feb 12, 2025, 03:29 PM
Last activity: Feb 18, 2025, 07:59 AM
Last activity: Feb 18, 2025, 07:59 AM