How to cat <> a file containing code?

You only need a minimal change; single-quote the here-document delimiter after <<. or equivalently backslash-escape it: Without quoting, the here document will undergo variable substitution, backticks will be evaluated, etc, like you discovered. If you need to expand some, but not all, values, you need to individually escape the ones you want to prevent. will produce … Read more

What does the line “#!/bin/sh” mean in a UNIX shell script?

It’s called a shebang, and tells the parent shell which interpreter should be used to execute the script. Most scripting languages tend to interpret a line starting with # as comment and will ignore the following !/usr/bin/whatever portion, which might otherwise cause a syntax error in the interpreted language.

What does it mean to write to stdout in C?

That means that you are printing output on the main output device for the session… whatever that may be. The user’s console, a tty session, a file or who knows what. What that device may be varies depending on how the program is being run and from where. The following command will write to the … Read more

What does WEXITSTATUS(status) return?

WEXITSTATUS(stat_val) is a macro (so in fact it does not “return” something, but “evaluates” to something). For how it works you might like to look it up in the headers (which should be #included via <sys/wait.h>) that come with the C-compiler you use. The implementation of this macro might differ from one C-implementation to the other. Please note, … Read more

What does ^M character mean in Vim?

Unix uses 0xA for a newline character. Windows uses a combination of two characters: 0xD 0xA. 0xD is the carriage return character. ^M happens to be the way vim displays 0xD (0x0D = 13, M is the 13th letter in the English alphabet). You can remove all the ^M characters by running the following: Where ^M is entered by holding down Ctrl and … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)