gnuplot, suse, rsync, cygwin, vim, linux, octave

warning: Creating default object from empty value in /homepages/34/d93266176/htdocs/el-badawy/modules/taxonomy/taxonomy.pages.inc on line 33.

The vimrc file

On Windows, Vim looks for its startup configuration (the vimrc file) in following order:
1. $VIM/vimrc
2. $HOME/_vimrc
3. $VIM/_vimrc

Cygwin's Vim looks for its startup configuration in following order:
1. $VIM/vimrc
2. $HOME/.vimrc

For Windows, $VIM is typically c:\program files\vim.
For Cygwin, $VIM is typically /usr/share/vim

In order to use a single location for my custom vim settings, I put them in c:\cygwin\home\username\.vimrc , and I add "source c:\cygwin\home\username\.vimrc " to the bottom of c:\program files\vim\vimrc (the sole addition to that file).

Octave hints

  • If you have a script called myscript.m, and you run it in Octave by typing "myscript.m" at the command prompt, you will get the following error: "error: can't perform indexing operations for type". The solution is to call the script at the command prompt without the file extension (that is, just type "myscript" a the octave prompt

GNU make

Useful command-line options for GNU make

-n : Print the commands, but do not execute them
-e : variables from the environment take precedence
-d : print debugging info

How to use find

  • Finding all files containing string "get_map"
    $ find . -name *.c | xargs grep -l get_map
  • A more sophisticated use:
    $ find . -name '*.[ch]' -print0 | xargs -r -0 grep -l get_map

    find: -print0
    xargs: -0 -r

  • on Cygwin, Windows file are usually case insensitive, one might need/want to make the search case-insensitive using the -iname option
    $ find /cygdrive/c/WINDOWS/Microsoft.NET -iname "msbuild.*"

Getting started with gnuplot

cd "/opt/gnuplot/demo"
load "filename"

plot sin(x)
replot cos(x)

Links:
http://www.ibm.com/developerworks/library/l-gnuplot/

Printing to a PDF file:
set terminal pdf
set output "graph.pdf"
plot [0:100] "file.txt" with lines;
set terminal x11

Syndicate content