Changes between Version 2 and Version 3 of Documentation/UserGuide/ShellScript


Ignore:
Timestamp:
2020-02-28T17:59:10+01:00 (4 years ago)
Author:
pmaugis
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Documentation/UserGuide/ShellScript

    v2 v3  
    11= How to write a shell script = 
    2  
     2Author: S.Luyssaert 
     3Last revised: 2020/02/28, P. Maugis 
    34 
    45== A super simple script for recurring tasks == 
    5 We want to make a script that deletes all the history and restart files from ORCHIDEE so that we can run the next simulation within the same file structure. We will call the command 'clean'. 
     6We want to make a script that deletes all the history and restart files from ORCHIDEE so that we can run the next simulation within the same file structure with the same starting time. We will call the command ''clean.sh''. 
    67 
    7 open an editor for the command name i.e. clean 
     8Open an editor for the command file, i.e. 'clean.sh' 
    89{{{ 
    910emacs ../bin/clean.sh 
    1011}}} 
    1112 
    12 Write the linux commands in the editor.  
     13Write the linux commands in the editor. Here, we selct 'bash' as the shell-interpreter. 
    1314{{{ 
    1415#!/bin/bash 
     
    2122}}} 
    2223 
    23 you can now type 'clean.sh' to execute the linux commands in the file clean.sh 
     24you can now type ''clean.sh'' to execute the linux commands from the file 'clean.sh'