Can't believe I've been running Linux for 16 years and I didn't know about that one.
Can't believe I've been running Linux for 16 years and I didn't know about that one.
But I'm glad I looked at the list first, because I found this wonder: `lstopo --of txt`. I'm going to use this in class next week, I can't believe I've never seen that before.
Edit: It looks like I agree with you; `replace` only solves trivial problems that can easily be done with `sed`.
sed -e 's_https://www\.example\.com/_/_g'
I think it's nicer than: sed -e 's/https:\/\/www\.example\.com\//\//g'If you haven't taken the time, I'd say it's well worth learning exactly how the shell escapes work. It's surprisingly simple and natural once you get used to it.
Even with single quotes, sed still requires escaping parentheses, + operators, and other operators that would otherwise be interpreted literally (but not all operators should be escaped). In the languages that I learned regexes this wasn't required.
My issue is remembering how to invoke the command - whether it edits in place by default, what the order of arguments is, etc. To be fair, that's not necessarily that much easier with a dedicated replace command either.
It appears to be provided by the following packages:
mysql-server-5.7
mariadb-server-10.0
percona-server-server-5.6
percona-xtradb-cluster-server-5.6
I downloaded mysql to check, and it appears that the replace provided is as described in the article; I assume the others are as well.Unfortunately it seems to pull in some MySQL/MariaDB specific code - https://github.com/MariaDB/server/blob/bb2c1a52c61706dde8c52...
I don't know its status in MariaDB.
[0] https://dev.mysql.com/doc/refman/5.7/en/replace-utility.html
This name clash makes that the perl module cannot be easily used on CentOS, since the CentOS utility is required for building RPM packages.
You'd have to edit Makefile.PL of the Perl module before installation, to avoid that clash. (I'd prefer to keep the name as "rename.pl", in this case; though file-rename, as on Windows, would work too.)
?!