0

How can i make the output of echo become the replacement text for 'sed'? I do not understand why i cannot use $p like this.

while read p; do
  sleep 1
  echo $p | sudo sed -i '/AuthUser/s/= .*/= $p/' /etc/ssmtp/ssmtp.conf
done <emailaddresses.txt
apx
  • 21
  • 4

0 Answers0