Check These Out
The first sort is necessary for ips in a list to be actually unique.
copying files from one server to another using rysnc. Root access need to be allowed on the destination.
I learned a few things reading this command. But I did run into a few issues:
1. On systems that don't use GNU echo (e.g. macOS 10.14.5 Mojave), the e option may not be supported. In this case ANSI escape codes will echoed as text and the terminal will not flash, like this:
\e[?5h\e[38;5;1m A L E R T Thu Jun 20 16:31:29 PDT 2019
2. Since the read command strips\ignores leading backslashes, if a user types the backslash character once in the loop, it will not break. Typing backslash twice in a loop will break as expected.
3. The foreground color is set to red (\e[38;5;1m) on every loop. This could be set once before we call while, and then reset once when the loop breaks.
4. Instead of resetting the foreground color when it breaks, the video mode is set back to normal (\e[?5l). This has the effect of leaving the terminal text red until it is manually reset.
The alternative I'm proposing here addresses these issues. I tested it on macOS and Arch Linux.
Commandlinefu.com is great but has a few bugs when people are submitting new commands:
.
1. There is no preview button. This was a minor inconvenience before, but now is a major problem since new commands won't show up to be edited until they have been moderated.
.
2. White space in the description field and in the comments is almost completely lost. People resort to using periods in between paragraphs to force a line break. Indentation of code is ridiculous.
.
3. Many characters get munged.
.
3a. For example, a less than character in the description gets read as an HTML tag and discarded. In order to type a less than, I've had to type "<" (I hope that comes out right). Unfortunately, when re-editing a command, the HTML entity is turned into a literal less than character, which I have to change back by hand before saving.
3b. Some unicode characters work in the description field, but turn into ugly literal HTML strings when put in the sample output or in an additional command using the $ prefix.
.
For example, here is a unicode character: ❥
$ Here is the same character after a dollar sign: ❥
.
3c. Some unicode characters don't work anywhere. Bizarrely, it appears to be the most commonly needed ones, such as Latin-1 accented characters. Here are some examples,
.
Bullet: ?, Center dot: ?, Umlaut u: ?.
.
4. Here is an example of the greater than, >, and less than,
Part of coreutils - so needs no extra package...
I just wanted a simple DNS request.
Because host and nslookup commands are not on all systems, we use getent instead.
Thanks aulem for that tip.