Skip to content

Don't use backticks for command substitution

Arnaud Rebillout requested to merge arnaudr/archvsync:no-backticks into master

While setting up a mirror, an unexperienced sysadmin replaced:

# MIRRORNAME=`hostname -f`

With the following:

MIRRORNAME=`foo.example.org`

The sysadmin is Korean and doesn't seem to be familiar with English, so it's very possible that they didn't even see it was a backtick, or maybe they're not familiar with Bash and thought that quotes and backticks were the same.

So let's switch to modern syntax to avoid this kind of mistake in the future.

Merge request reports

Loading