I want to add the following to the file /etc/securetty
using sed
:
pts/0
pts/1
pts/2
pts/3
pts/4
pts/5
pts/6
pts/7
pts/8
pts/9
I wrote the following command for this purpose:
sed -i '$a pts/0\\npts/1\\npts/2\\npts/3\\npts/4\\npts/5\\npts/6\\npts/7\\npts/8\\npts/9' /etc/securetty
which gives me the output:
pts/0\npts/1\npts/2\npts/3\npts/4\npts/5\npts/6\npts/7\npts/8\npts/9
I'm clearly missing out on something here. What could be wrong in my sed
command?
sed
... – don_crissti Apr 14 '17 at 13:35