@Aditya That's the only one that has no quotes in it
Hmm, no, I'm wrong. That's not the problem
AAH! Got it!
@Aditya, the problem is the spaces. Since you have not quoted the expressions, sed takes the first space to be the end of the expression and complains because you didn't close the s/// operator:
Because echo does not split its arguments, it prints everything passed to it.
@Braiam I know and without them you'll get exactly the same result
Because echo does not show this problem
Try: echo a b c d
and: echo "a b c d"
same output
But not at all the same situation. In the first case, echo gets 4 arguments and in the second 1. That is the problem here but echo won't show it because it simply prints its entire argv array.
@Aditya by the way, in general echo is often useful, as Braiam suggested, for this kind of thing. It just won't show space issues because it outputs everything you pass it.
the problem with echo is that it wouldn't make evident the problem, I would know that if there's spaces between regexes and there isn't some character escaping it, it will give problems later
Another sed problem, trying to add a line as /opt/vnstat_switcher.sh to /etc/rc.local file before "exit 0"... I have created a copy of /etc/rc.local as ~/Desktop/rc.local
sed -i.bak -e "s/\nexit 0/\n\/opt\/vnstat_switcher.sh\nexit 0/" ~/Desktop/rc.local
Has anyone, or was any Stack Exchange site ever publicly benchmarked?
This curiosity came to me because I'm building a site similar to this and needed an already existing site as a model, to compare the benchmarks with my site's own.
I've tried nearly everything so far, but the results are far ...
In chat, when putting text between grave accents to ensure that it is output as code, the resulting text is not very distinguishable from the other text:
The only way it's different, right now, is that a different font is used. Is there any way we could
highlight it
make it a different col...