How to colorize diff on the command line

Man pages for diff suggest no solution for colorization from within itself. Please consider using colordiff. It’s a wrapper around diff that produces the same output as diff, except that it augments the output using colored syntax highlighting to increase readability: or just: Installation: Ubuntu/Debian: sudo apt-get install colordiff OS X: brew install colordiff or port install colordiff

Run R script from command line

If you want the output to print to the terminal it is best to use Rscript Note that when using R CMD BATCH a.R that instead of redirecting output to standard out and displaying on the terminal a new file called a.Rout will be created. One other thing to note about using Rscript is that it doesn’t … Read more

fatal: This operation must be run in a work tree

I get this error when I try to change branch. Probably I will give some information of the commands at upon command: I get following output And when I try the command I get following output: config file contents: repositoryformatversion = 0 filemode = true bare = true url = /path/to/git/repo/.git

Run C++ in command prompt – Windows

It depends on what compiler you’re using. For example, if you are using Visual C++ .NET 2010 Express, run Visual C++ 2010 Express Command Prompt from the start menu, and you can simply compile and run the code. or from the regular command line, you can run vcvars32.bat first to set up the environment. Alternatively search for setvcvars.cmd (part … Read more

How do I set a variable to the output of a command in Bash?

In addition to backticks `command`, command substitution can be done with $(command) or “$(command)”, which I find easier to read, and allows for nesting. Quoting (“) does matter to preserve multi-line variable values; it is optional on the right-hand side of an assignment, as word splitting is not performed, so OUTPUT=$(ls -1) would work fine.

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