n22e113 n22e113@yahoo.ca [sed-users]
2015-12-15 02:28:20 UTC
Hi,Seders,
Can someone have a look (Debian 8/GUN sed 4.2.2)?
$ echo 'mail_location=mbox:~/mail:INBOX=/var/mail/%u' |\
sed -e 's/^mail_location\(.*\)$/#mail_location\1/'
#mail_location=mbox:~/mail:INBOX=/var/mail/%u
$ echo 'mail_location=mbox:~/mail:INBOX=/var/mail/%u' |\
sed -e '/^mail_location\(.*\)$/ c\#mail_location\1/'
#mail_location1/
Results are not the same with s/ & c\!
Q. What am I do wrong?
Can someone have a look (Debian 8/GUN sed 4.2.2)?
$ echo 'mail_location=mbox:~/mail:INBOX=/var/mail/%u' |\
sed -e 's/^mail_location\(.*\)$/#mail_location\1/'
#mail_location=mbox:~/mail:INBOX=/var/mail/%u
$ echo 'mail_location=mbox:~/mail:INBOX=/var/mail/%u' |\
sed -e '/^mail_location\(.*\)$/ c\#mail_location\1/'
#mail_location1/
Results are not the same with s/ & c\!
Q. What am I do wrong?