An Ubuntu 16.04 udev rule is defined:
target='SUBSYSTEMS=="usb", ATTRS{product}=="Metrologic Scanner", GROUP:="username"'
Command to append a rule to test udev file fails:
sudo echo $target > /etc/udev/rules.d/test.txt
What must be done to overcome the response \ error:
bash: /etc/udev/rules.d/test.txt: Permission denied
Examples and explanations are highly appreciated: thank you