Hello,

In my bash shell script, when I say:

sudo echo "something" >>/etc/postfix/virtual_alias_maps

it could not run with the prompts:

bin/mask.sh: line 18: /etc/postfix/virtual_alias_maps: Permission denied


but, if I just say:

echo "something" >>/etc/postfix/virtual_alias_maps

and run that script with the form of "sudo bin/mask.sh", it successes.

Can you help me why the first sudo failed?

Thanks.

Reply via email to