Index: /utils/developer/README.rst
===================================================================
--- /utils/developer/README.rst	(revision 11709)
+++ /utils/developer/README.rst	(revision 11709)
@@ -0,0 +1,265 @@
+**********************************
+Developer guide for SVN operations
+**********************************
+
+.. contents::
+    :depth: 1
+
+Source code organisation
+========================
+
+Building from several checkouts
+-------------------------------
+
+| As of now, the NEMO code is build from different sources in the repository,
+  via SVN external definitions which are special versioned properties specified on its sub-items
+  (folders and file).
+| For more, read `the documentation on external definitions in ​the SVN book
+  <http://svnbook.red-bean.com/en/1.7/svn.advanced.externals.html>`_.
+
+On one hand, the *core code*, which is actively developed from one release to another,
+is still present and unique for a branch.
+
+:./cfgs:  Reference configurations
+:./doc:   Reference manuals (LaTeX) and user guide (reStructuredText)
+:./src:   Modelling routines
+:./tests: Test cases
+
+| On the other hand,
+  the *complementary code*, defined by minor modifications between consecutive releases,
+  is managed apart from the default development organisation
+  (``branches``, ``releases``, `tags` and ``trunk``).
+| It has been extracted to another locations in the repository and
+  can considered from now on as external sources.
+
+:./arch:     Settings for computing architecture
+:./ext:      External dependencies
+             (AGRIF for nesting, FCM for compilation and IOIPSL for IO)
+:./makenemo: Script for building NEMO executable
+:./mk:       Compilation sub-scripts
+:./tools:    User tools
+
+.. note::
+
+    The major benefit of this implementation is the convenient way of sharing code.
+    Part of the source code can be develop in one location, in-house or externally,
+    and distribute to several working copies.
+
+External sources in working copy
+--------------------------------
+
+Here is the current list of these externals for the NEMO code:
+
+.. code:: sh
+
+    # Relative URL                         Item
+    # '^': alias for repository root
+    ^/utils/build/arch@{HEAD,${REV}}       arch
+    ^/utils/build/makenemo@{HEAD,${REV}}   makenemo
+    ^/utils/build/mk@{HEAD,${REV}}         mk
+    ^/utils/tools@{HEAD,${REV}}            tools
+    ^/vendors/AGRIF/dev@{HEAD,${REV}}      ext/AGRIF
+    ^/vendors/FCM@{HEAD,${REV}}            ext/FCM
+    ^/vendors/IOIPSL@{HEAD,${REV}}         ext/IOIPSL
+
+.. important::
+
+    Regarding the main branches of NEMO development,
+    official releases and tagged snapshots will have fixed externals,
+    however the trunk will always refer to the ``HEAD`` of the repository.
+
+.. note::
+
+    | As we cannot add comments in the context of versioned properties,
+      the revision number of an external source could be a major information
+      for those would starting to scrutinize the code.
+    | Revision changes have to be limited it to what is strictly necessary,
+      i.e. only for the external(s) at stake, and
+      each definition must refer to an effective revision considered as reliable.
+
+Developer perspective
+---------------------
+
+| The external definitions are retained by branching operations so in the first place
+  a development branch created from the trunk will update its external sources to the latest.
+| From that the developer makes a choice for each external in the development branch
+
++--------------------------+---------------------------------------------------------+
+| *Set explicit revision*  | Isolated from unwanted commits                          |
+|                          |                                                         |
+|                          | Get back to or reproduce confidently a previous version |
++--------------------------+---------------------------------------------------------+
+| *Keep ``HEAD`` revision* | Modify directly the external and receive all updates    |
+|                          |                                                         |
+|                          | No commit record in the meantime                        |
++--------------------------+---------------------------------------------------------+
+
+| Due to different attributes exposed above,
+  **it is strongly recommended to set explicit revisions on externals for a development branch**.
+| Nevertheless the developer can have its reasons to have implicit revision for given item(s) and
+  can update the definitions on a case-by-case basis.
+
+The SVN commands for managing external definitions are below,
+modified externals are reported in the 2 :sup:`nd` column of ``svn {st,status}`` output.
+
+.. code:: sh
+
+    ## Get the current definitions
+    $ svn propget   svn:externals ${PATH}
+
+    ## Edit them in external editor (SVN_EDITOR env. variable)
+    $ svn propedit  svn:externals ${PATH}
+
+.. warning::
+
+    Think about committing your new definitions
+
+Recommended development environment
+===================================
+
+Lightweight repository copy
+---------------------------
+
+.. |download| replace:: **download**
+.. _download: https://forge.ipsl.jussieu.fr/nemo/export/HEAD/utils/dev/install_dev_env.sh
+
+Although each developer can have its own approach for developing the NEMO source code,
+**we recommend to** |download|_ **and run** ``install_dev_env.sh`` **script to
+set up a clean and minimal environment**.
+From there, the developer would be able to start his developments but
+also to support the NEMO shared reference in the same working copy.
+
+| Actually the script will checkout the repository in a slightly different manner from the usual way,
+  using the ``--depth`` and ``--set-depth`` SVN options in order to
+  download the sub-paths of the default development organisation in various depths
+  (``branches``, ``releases``, ``tags`` and ``trunk``).
+| In the end, the developer will have a versioned copy of the repository first levels with empty folders,
+  except for the `trunk` (``/NEMO/trunk``) and the last official release (``/NEMO/releases/release-X.X``)
+  which have been fully downloaded.
+
+The benefits of this new approach are numerous
+
+- **Possibility to work offline like git**:
+  create a development branch by copying the `trunk` locally and
+  start coding without a first commit to the remote repository,
+  instead of creating the development branch remotely on the repository,
+  then downloading it to begin to work.
+- **Simple UNIX-like syntax for SVN commands** (``svn {add,cat,cp,ls,mv,rm} ...``) and
+  no more tedious URL scheme to use (``svn+ssh://...``).
+- **All developments handled in one common location** by
+  putting an end at the branches scattering with several isolated working copies
+  (usually one single checkout per branch).
+
+Examples
+--------
+
+Usage of ``install_dev_env.sh``
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+.. code:: console
+
+    $ ./install_dev_env.sh [${DEVELOPER_ID} [repo]]
+
+Positional arguments in option
+
+1. ``DEVELOPER_ID``: configure the working copy in developer mode,
+   i.e. URL in ``svn info`` begins with |DEV_URL| ... instead of |URL|,
+   so the developer can commit to the repository right away
+   (switching can be made later if needed).
+2. ``repo``: download the whole layout of the repository instead of the default development organisation
+   to manage the development of the sources used as externals.
+   By default,
+   the checkout is from root directory ``/NEMO`` with ``branches``, ``releases``, ``tags`` and ``trunk``.
+   With ``repo`` argument, it does from the root of repository with ``/NEMO``, ``/utils``, ``/vendors``.
+
+Create a branch
+^^^^^^^^^^^^^^^
+
+.. code:: console
+
+    $ svn copy {${URL_SRC},${PATH_SRC}}[@${REV}] {${URL_DST},${PATH_DST}}
+
++------------------+--------------------------------------------------------------------+-----------------------------------------------+
+|  local -> local  | ``PATH_SRC`` = ``trunk``                                           | *Copy unversioned items to the new branch*    |
+|                  |                                                                    |                                               |
+|                  | ``PATH_DST`` = ``branches/${YEAR}/${BRANCH_NAME}``                 |                                               |
++------------------+--------------------------------------------------------------------+-----------------------------------------------+
+|  local -> remote | ``PATH_SRC`` = ``trunk``                                           | *New branch created only in the repository*   |
+|                  |                                                                    |                                               |
+|                  | ``URL_DST``  = ``${DEV_URL}/NEMO/branches/${YEAR}/${BRANCH_NAME}`` |                                               |
++------------------+--------------------------------------------------------------------+-----------------------------------------------+
+| remote -> local  | ``URL_SRC``  = ``${URL}/NEMO/trunk``                               | *Clean copy of the trunk from the repository* |
+|                  |                                                                    |                                               |
+|                  | ``PATH_DST`` = ``branches/${YEAR}/${BRANCH_NAME}``                 |                                               |
++------------------+--------------------------------------------------------------------+-----------------------------------------------+
+| remote -> remote | ``URL_SRC``  = ``${URL}/NEMO/trunk``                               | *All done on server side*                     |
+|                  |                                                                    |                                               |
+|                  | ``URL_DST``  = ``${DEV_URL}/NEMO/branches/${YEAR}/${BRANCH_NAME}`` |                                               |
++------------------+--------------------------------------------------------------------+-----------------------------------------------+
+
+.. |URL|      replace:: ``http://forge.ipsl.jussieu.fr/nemo/svn``
+.. |DEV_URL|  replace:: ``svn+ssh://${DEVELOPER_ID}@forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn``
+
+.. note::
+
+    | ``URL``     = |URL|
+    | ``DEV_URL`` = |DEV_URL|
+
+    | Usual convention for the naming of the development branches:
+    | ``BRANCH_NAME`` = ``dev_r${TRUNK_REVISION_ON_FORK}_${ACTION_NAME_IN_WORKPLAN}``
+
+
+Download a branch from the repository
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. code:: console
+
+    List the remote branches in the repository
+    $ svn ls branches/${YEAR}
+
+    Download the one chosen
+    $ svn update branches/${YEAR}/${BRANCH_NAME}
+
+Delete the local copy of a branch
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. code:: console
+
+    Set branch depth to 'exclude'
+    => Tag the branch as to be deleted
+    $ svn update --set-depth exclude branches/${YEAR}/${BRANCH_NAME}
+    D    dev_r....
+
+    Effective removal
+    $ svn update branches/${YEAR}
+
+Working smart with available resources
+======================================
+
+Make link between commit and ticket(s)
+--------------------------------------
+
+If a commit is related to ticket(s), we highly suggest to mention it in the commit log message:
+
+  - the commit will be converted into a comment in the ticket thread(s)
+  - URL link(s) to selected ticket(s) will be provided in the email notification and the changeset page.
+
+| To do so,
+  you can use a word from this list ``addresses re references refs see`` followed by usual ticket link(s).
+| For instance
+
+.. code:: console
+
+    $ svn commit -m '[...] see #${TICKET_ID} [...]'
+
+Close ticket(s) when committing
+-------------------------------
+
+| If a commit is a fix,
+  you can close targeted ticket(s) with the commit operation without the need of a browser.
+| For this,
+  you can use a word from the list ``close closed closes fix fixed fixes`` followed by usual ticket link(s).
+| For instance
+
+.. code:: console
+
+    $ svn commit -m '[...] fix #${TICKET_ID} [...]'
Index: /utils/developer/bash-font-lock.el
===================================================================
--- /utils/developer/bash-font-lock.el	(revision 11709)
+++ /utils/developer/bash-font-lock.el	(revision 11709)
@@ -0,0 +1,81 @@
+; Bash syntax highlighting
+
+(defvar bash-builtins  ;; Unrecognized UNIX commands
+  '("awk" "basename" "cat" "cp" "cut" "date" "diff" "dirname" "env" "find"
+    "grep" "head" "ls" "make" "mkdir" "mv" "rm" "sed" "sort" "svn" "tail" "tee"
+    "touch" "uniq" "xargs"                                                     ))
+
+(defvar bash-keywords  ;; Bash keywords (consistency with 'return' command fontification)
+  '("declare" "let" "local" "readonly" "typeset" "set" "unset"                 ))
+
+(defvar bash-functions ;; Sourced or declared fonctions
+  '("fake_func"                                                                   ;; 
+    "em" "ev" "ge" "heil" "mkcd" "ok"                                             ;; Common
+    "nemch" "nemde" "nemid" "nemtr" "nemst"                                       ;; NEMO branchs
+    "cmpcf" "if90" "gf90"                                                         ;; NEMO cmp
+    "nemo_help" "nemo_cfg"                                                        ;; NEMO cfg
+    "append_output_file" "appech_output_file" "super_grep" "check_args_count"     ;; NEMO SETTE
+    "set_namelist" "set_xio" "post_test_tidyup"                                )) ;; Id
+
+(defvar bash-font-lock ;; Be careful with order
+  '(;; Variables
+    ;;; GLOBALS variables|arrays
+    ("\\(?:export +\\)?\\$?{?\\(#?[A-Z][A-Z_0-9]+\\)\\(?:\\[\\(?2:[@*]\\)\\]\\)?"
+     (1 font-lock-constant-face     ) (2 font-lock-constant-face      nil t))
+    ;;; Locals arrays
+    ("\\(?1:#?[a-z][a-z_0-9]+\\)\\[\\([@*]\\)?"
+     (1 font-lock-variable-name-face) (2 font-lock-variable-name-face nil t))
+    ;;; Shell specials variables
+    ("\\${?\\([#@?!_-]?[a-z]?[a-z_0-9]*\\)}?" 1 font-lock-variable-name-face)
+
+    ;; Tests  '[ ... ]' '[[ ... ]]' '(( ... ))'
+    ("\\((\\{2\\}\\) \\(?:.*\\) \\()\\{2\\}\\)"            
+     (1 font-lock-builtin-face) (2 font-lock-builtin-face))
+    ("\\(\\[\\{1,2\\}\\) \\(?:[^]]+\\) \\(\\]\\{1,2\\}\\)"
+     (1 font-lock-builtin-face) (2 font-lock-builtin-face))
+
+    ;; Operators  ' ! ' ' != ' ' ~= '  ' && ' ' || '
+    (" \\!=? \\| ~= " 0 font-lock-negation-char-face)
+    (" && \\| || "    0 font-lock-keyword-face      )
+
+    ;; Compound commands
+    ("\\\\$"                0 font-lock-warning-face) ; '\'
+    ("\\(?:[^;]\\)\\(;\\) " 1 font-lock-keyword-face) ; '; '
+     ;;; Function
+    ("^\\(?:function +\\)?\\(\\sw+\\)(?)? +\\({\\)"
+     (1 font-lock-function-name-face) (2 font-lock-warning-face      ))
+    ("^}$"                             0 font-lock-warning-face       )
+     ;;; Commands block ' { ...; }'
+    ("\\({\\) \\(?:[^}]*\\); +\\(}\\)?" (1 font-lock-warning-face) (2 font-lock-warning-face nil t))
+    ("\\(?:.*\\); +\\(}\\)$"          1 font-lock-warning-face                                  )
+     ;;; Sub-shell      '( ...  )'
+    ("\\((\\) \\(?:[^)]*\\) \\()\\)" (1 font-lock-warning-face) (2 font-lock-warning-face))
+
+    ;; 'case ... in ...) ...;; esac'
+    ("\\()\\)\\(?:[^)]*\\)\\(;;\\)" (1 font-lock-keyword-face) (2 font-lock-keyword-face))
+    ("^[^(]*\\()\\)$"                1 font-lock-keyword-face) ; Regular syntax
+    ("^\\s-+;;$"                     0 font-lock-keyword-face) ;    "      ""
+    )
+  )
+
+; Configuration loading
+(font-lock-add-keywords 'sh-mode `((,(regexp-opt bash-builtins  'words) 0 font-lock-builtin-face      )))
+(font-lock-add-keywords 'sh-mode `((,(regexp-opt bash-keywords  'words) 0 font-lock-keyword-face      )))
+(font-lock-add-keywords 'sh-mode `((,(regexp-opt bash-functions 'words) 0 font-lock-function-name-face)))
+(font-lock-add-keywords 'sh-mode bash-font-lock                                                         )
+
+; Highlighting example for font lock faces
+(font-lock-add-keywords 'sh-mode '(
+  ("font-lock-warning-face"           . font-lock-warning-face          )
+  ("font-lock-function-name-face"     . font-lock-function-name-face    )
+  ("font-lock-variable-name-face"     . font-lock-variable-name-face    )
+  ("font-lock-keyword-face"           . font-lock-keyword-face          )
+  ("font-lock-comment-face"           . font-lock-comment-face          )
+  ("font-lock-comment-delimiter-face" . font-lock-comment-delimiter-face)
+  ("font-lock-type-face"              . font-lock-type-face             )
+  ("font-lock-constant-face"          . font-lock-constant-face         )
+  ("font-lock-builtin-face"           . font-lock-builtin-face          )
+  ("font-lock-preprocessor-face"      . font-lock-preprocessor-face     )
+  ("font-lock-string-face"            . font-lock-string-face           )
+  ("font-lock-doc-face"               . font-lock-doc-face              )
+  ("font-lock-negation-char-face"     . font-lock-negation-char-face    )))
Index: /utils/developer/bibtool.rsc
===================================================================
--- /utils/developer/bibtool.rsc	(revision 11709)
+++ /utils/developer/bibtool.rsc	(revision 11709)
@@ -0,0 +1,62 @@
+## No tab indentation for readability
+print.use.tab = off
+
+## Braces as delimiter
+rewrite.rule = { "^\{\(.*\)\}$"        "\"\1\"" }
+rewrite.rule = { "^\([^\"].*[^\"]*\)$" "\"\1\"" }
+
+## Entry types in lowercase
+new.entry.type = "article"
+new.entry.type = "book"
+new.entry.type = "inbook"
+new.entry.type = "incollection"
+new.entry.type = "inproceedings"
+new.entry.type = "phdthesis"
+new.entry.type = "techreport"
+
+## Normalisation of 'pages' field 
+rewrite.rule = { pages # "\([0-9]+\),\([0-9]+\)" "\1\2"   }
+rewrite.rule = { pages # "\([0-9]+\)–\([0-9]+\)" "\1--\2" }
+rewrite.rule = { pages # "\([0-9]+\)-\([0-9]+\)" "\1--\2" }
+
+## Removing void fields
+rewrite.rule = { "^{ *}$" }
+
+## Delete 'url' field if 'doi' is present
+print { Removal of redundancies ('doi'='url') }
+rename.field = { url = dbl if doi = ".*" }
+delete.field = { dbl }
+
+## Definition of fields order
+sort.order =
+{ * =
+      # title     # chapter     # pages
+      # journal   # booktitle   # edition # editor # series 
+      # volume    # number      
+      # author    # institution # school
+      # year      # month
+      # publisher # issn        # isbn
+      # doi       # url
+}
+
+## Keys 
+print { Generate new citation keys: 1stauthor[.2ndauthor[.ea]]_[journal|type]year }
+ignored.word = "of"
+ignored.word = "and"
+ignored.word = "in"
+ignored.word = "du"
+ignored.word = "de"
+key.base = lower
+key.format =
+{ %s(bibkey) # %-2n(author)_
+     {   
+          %+5.1W(journal)
+             # %0s(@book         ) { bk   } # %0s(@inbook       ) { ibk  }
+             # %0s(@incollection ) { icol } # %0s(@inproceedings) { iprc }
+             # %0s(@phdthesis    ) { phd  } # %0s(@techreport   ) { rpt  }
+     }
+  %2d(year)                    
+}
+
+print { Sort entries by key }
+sort = on
Index: /utils/developer/install_dev_env.sh
===================================================================
--- /utils/developer/install_dev_env.sh	(revision 11709)
+++ /utils/developer/install_dev_env.sh	(revision 11709)
@@ -0,0 +1,69 @@
+#!/bin/sh
+
+## Create minimal developement environment for NEMO
+###################################################
+
+## Optional arguments (developer ID, 'repo' to replicate the layout of the whole repository)
+
+dir='NEMO_dev'; repo='0'; root='/NEMO'
+ver='4.0.1'
+
+year=$( date +%Y )
+
+while (( $# )); do
+    [ "$1" == 'repo' ] && { dir='NEMO_repo' && repo='1' && root='/'; shift; }
+    id=$1
+    shift
+done
+
+[ -d $dir ] && { echo $dir 'already exists => QUIT'; exit 2; }
+
+## Copy of the repository with empty root directories
+echo 'Download a void working copy of' $root 'from the repository ("svn co --depth empty")'
+svn co --depth empty http://forge.ipsl.jussieu.fr/nemo/svn/$root $dir
+echo
+
+
+## Switch to developer role if ID is provided
+if [ -n "$id" ]; then
+    echo 'Switch to developer role by relocating the URL scheme from HTTP to SVN+SSH'
+    echo '("svn sw --relocate http://... svn+ssh://...")'
+    ssh-copy-id -i ~/.ssh/id_rsa.pub $id@forge.ipsl.jussieu.fr 2> /dev/null
+    svn sw --relocate    http://forge.ipsl.jussieu.fr                        \
+                      svn+ssh://$id@forge.ipsl.jussieu.fr/ipsl/forge/projets \
+        $dir
+    echo
+fi
+
+## If requested by 'repo',
+if [ "$repo" == '1' ]; then
+    echo "With 'repo' arg, create a lightweight copy of the repository"
+    echo 'for the developement of the sources defined as "externals"'
+
+    for item in utils/build/{arch,makenemo,mk} utils/tools       \
+                vendors/{AGRIF/dev,AGRIF/release-$ver,FCM,IOIPSL}  ; do
+        echo '¤' $item
+        svn up -q --parents $dir/$item
+    done
+
+    dir+=/'NEMO'
+    echo
+fi
+
+
+## Get the 1st level tree under 'branches' and 'releases'
+echo "Get empty folders under '/NEMO/branches' (\"svn up --depth empty --parents\"):" \
+    {UKMO,$((year - 1)),$year}
+svn up -q --set-depth empty --parents $dir/branches/{UKMO,$((year - 1)),$year}
+echo
+
+
+## Download trunk and last release
+echo 'Full download of 2 main branches ("svn up"): trunk and last stable'
+echo "¤ '/NEMO/trunk'"
+svn up -q           $dir/trunk
+
+echo "¤ '/NEMO/releases/release-$ver'"
+svn up -q --parents $dir/releases/release-$ver
+
+exit 0
Index: /utils/developer/template.sh
===================================================================
--- /utils/developer/template.sh	(revision 11709)
+++ /utils/developer/template.sh	(revision 11709)
@@ -0,0 +1,186 @@
+#!/bin/bash
+
+
+#§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§
+#
+# This template for Bash coding pair with Emacs Lisp package 'bash-font-lock.el'
+# to enhance default shell syntax fontification. This package is based on regexs
+# to match examples of concsyntax showed below.
+# All this is not mandatory and probably not optimized with other correct rules
+# Feel free to add your tips, modify it at your convenience or give your feedback
+# to improve it.
+#
+#§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§
+
+
+# To automatically use it with a bash script, copy it to your ~/.emacs.d and 
+# add '(load "~/.emacs.d/bash-font-lock.el")' in your .emacs configuration file
+#--------------------------------------------------------------------------------
+ # If a command  is not highlighted, add its name to 'bash-builtins'  list
+ # "  " function ""  "       "     ,  "   "   ""  "" 'bash-functions'  "" 
+
+# UNIX built-in commands sample
+#-------------------------------
+.; alias; bg; bind; builtin; caller; compgen; complete; declare; dirs; disown
+enable; fc; fg; help; history; jobs; kill; let; local; popd; printf; pushd
+shopt; source; suspend; typeset; unalias; eval; export; getopts; newgrp; pwd
+read; readonly; times; ulimit; command; hash; test; type; cd; echo; eval; set
+shift; umask; unset; wait
+
+# Common bash built-in commands already added to 'bash-builtins' list
+#---------------------------------------------------------------------
+awk basename cat cp cut date diff dirname env find grep head ls make mkdir mv rm
+sed sort svn tail tee touch uniq xargs
+
+# Variables
+#-----------
+ # Specials    parameters (see Bash manual for details, `man bash`)
+$0 $# $* $@ $? $! $_ $$ $-
+ # Positionnal parameters (ordered arguments given to run script "$0")
+$1 $2 $3 ...                
+$* ==  "$1${IFS}$2${IFS}$3..." #   Single word , recommended use for string
+$@ ==  "$1"    "$2"    "$3"...  # Separate words, recommended use for array
+ # Identify locals against GLOBALS or ENVIRONMENT variables with case sensitive
+TEMP=${temp_0123}; temp=${TEMP_0123}; export TEMP=${TEMP_0123}
+ # Possibles variable assignation syntax
+temp='temp'; temp=$1 # Simple
+length_temp=${#temp} # Length of string
+temp=$(( 1 + 1 ))    # Integer arithmetic evaluation
+temp=${........}     # String operations
+temp=$(test ....)    # Regular syntax
+temp=$( test ... )   # Highlight sub-shell '( ... )' & command or function call
+temp=`test .....`    # Backquotes not recommended to avoid complete highlighting
+
+# Arrays
+#--------
+ # Initialisation
+declare -a array                 # Explicit
+array=([0]='zero' [1]='one' ...) # Implicit with index assignement
+array[0]='zero'; array[9]='ten'  # Implicit or add element to array at an index
+ # Curly brackets are essential to work with arrays
+ # Last index of an array
+IDX=${#temp_0123[@]}; idx=${#TEMP_0123[@]}
+ # Get last element of an array (${#array[@]})
+LAST_ELMNT=array[${#array[@]}]; last_elmnt=ARRAY[${#ARRAY[@]}]
+ # Remove an element or entire array
+unset array[9]; unset array[@]
+
+# Strings
+#---------
+ # Single quotes are recommended to identified entire characters string instead
+ # of doubles quotes or initialize variable
+echo 'The name of the script is '$0' with following arguments '$*
+ # Doubles quotes should only be used when it's necessary to interpret escaping
+ # character or to perform parameter substitution
+printf "The value of PI is %8.6f.\n" $PI; sed "s/3.1415/$PI/" temp.txt
+
+# Function
+#----------
+ # 'function' word is not not mandatory at declaration if you have double
+ # brackets '()' right after name. A function has to be declared before its call
+ # so should be placed at the beginning of the main script. A clever solution is
+ # to gather similar functions in kind of a 'module' file which will be sourced
+ # from main script.
+ # 2 possibles syntax:
+function fake_func { local temp=''; ...; return ...; }
+fake_func() {
+    local temp='' # Declare variable as local, if not his attribute is global
+    ...
+    return ...   # Function can only return an integer (stderr by default)
+                  # export result by a global variable to bypass it 
+}
+ # Function call (with or without argument)
+temp=$( fake_func $1 $2 ); fake_func $1 $2; fake_func
+
+# Tests operators differs with type of test (arithmetic or string comparison
+# for number/characters, file attributs), see manual for test with `man test`
+#----------------------------------------------------------------------------
+ # Possible syntax : literal 'test' or compact syntax with brackets/parenthesis
+ # at the ends
+ # '[ ... ]' & '[[ ... ]]' are almost identical (simple and extended test)
+ # With ' != ' & ' == ' operators, right string is considered as          regex
+ #  ""             '~='     "    ,   "     ""   "      ""     "  extended   "
+[ $temp ~= "..." ] && [[ ! -e temp.txt ]] || (( $temp >= 0 ))
+
+# For compound commands, prefer the use of command block '{ ...; }' instead of
+# a sub-shell '( ... )', keep in mind that despite sub-shell inherit from its
+# run script all variables declared as locals are lost at the end of execution
+
+# To cut a long sequence, put the escape character '\' at the end of line and
+# continue on next line (possible on several lines)
+printf "This is a very very very long sentence that I have to cut in order to  \
+        be less than 80 characters for a line of code but I don't have to call \
+        the same command several times.\n                                       "
+# A pipe ' | ' cannot be put at the end of a line, even if you have a '\'
+cat temp.txt | cut -d' ' -f-5 | sort -kr3n | uniq -c | sort | head -n25 \
+| awk '$3 >= 1024 {print $4}'                                           \
+| xargs -t -i() mv () $HOST@$HOSTNAME:${REP_STORAGE}
+
+# 'if ...; then ...; fi'
+#------------------------
+ # Very short syntax with commands block '{ ...; }'
+[ ... ] && { ...; ...; }
+ #      Short syntax with commands block '{ ...; }'
+[ ... ] && { ...; \
+             ...;  }
+ #    Regular syntax
+if [ ... ]; then
+    ...  
+fi
+
+# 'if ...; then ...;  else ...; fi'
+#----------------------------------
+ #   Short syntax with commands block '{ ... }'
+{ [ ... ] && ...; } || { ...; ...; }
+ # Regular syntax
+if [ ... ]; then
+    ...
+else
+    ...
+fi
+
+# 'case ... in ...) ... ;; ... esac'
+#-----------------------------------
+case ... in
+ # Very short syntax
+    ...) ...;;     ...) ...;;    ...) ...;;
+ #      Short syntax
+    ...) ...; ...; ...;;
+ #    Regular syntax
+    ...)
+	...
+	;;
+esac
+
+# List font lock faces with effective highlighting (can be customized)
+#---------------------------------------------------------------------
+ font-lock-warning-face
+ # for a construct that is peculiar, or that greatly changes the meaning of
+  #other text
+ font-lock-function-name-face
+ # for the name of a function being defined or declared
+ font-lock-variable-name-face
+ # for the name of a variable being defined or declared
+ font-lock-keyword-face
+ # for a keyword with special syntactic significance, like ‘for’ and ‘if’ in C.
+ font-lock-comment-face
+ # for comments
+ font-lock-comment-delimiter-face
+ # for comments delimiters, like ‘/*’ and ‘*/’ in C. On most terminals, this
+  #inherits from font-lock-comment-face
+ font-lock-type-face
+ # for the names of user-defined data types
+ font-lock-constant-face
+ # for the names of constants, like ‘NULL’ in C
+ font-lock-builtin-face
+ # for the names of built-in functions
+ font-lock-preprocessor-face
+ # for preprocessor commands. This inherits, by default, from
+  #font-lock-builtin-face
+ font-lock-string-face
+ # for string constants
+ font-lock-doc-face
+ # for documentation strings in the code. This inherits, by default, from
+  #font-lock-string-face
+ font-lock-negation-char-face
+ # for easily-overlooked negation characters
