• 🏠 Accueil
  • 🧰 Générateurs
  • 📰 Blog
  • 🔎 Rechercher
  • 📧 Contact
  • 📘 Livre d'or
  • 🗞️ News
  • 💰 Soutien
  • ℹ️ Info : Le site a été modernisé pour être plus lisible et compatible avec les smartphones. N'hésitez pas à me signaler tout bug via le formulaire de contact.

    Description

    Just a first example script, to understand how DjeShellSteps works. This example has 3 steps.

    example1.sh

    #!/bin/bash 
    ############################################################ 
    # File: example1.sh                                        # 
    # Author: Jerome DESMOULINS - djeshellstepsATdesmoulins.fr # 
    # Description:                                             # 
    #   DjeShellSteps example 1: sample shell script           # 
    #   with 3 steps.                                          # 
    ############################################################ 
    
    ### Initialisation for environnement variables mandatory for DjeShellSteps ### 
    . `dirname $0`/djeshellsteps.sh 
    
    ### Beginning of Shell Script ### 
    BeginSteps 
    echo "Starting Shell Script..." 
    
    ### Step 10 ### 
    Step 10 "List all files on current directory" 
    if [ $RunThisStep -eq 1 ]; then 
      ls 
    fi 
    
    ### Step 20 ### 
    Step 20 "Sleep for two seconds" 
    if [ $RunThisStep -eq 1 ]; then 
      sleep 2 
    fi 
    
    ### Step 30 ### 
    Step 30 "Display kernel version" 
    if [ $RunThisStep -eq 1 ]; then 
      uname -a 
    fi 
    
    ### End of Shell Script ### 
    EndSteps 
    [html]</pre>[/html] 
    [/block]#Description[/title] 
    Just a first example script, to understand how DjeShellSteps works. 
    This example has 3 steps. 
    
    [title=1]example1.sh[/title] 
    [block] 
    [html]<pre class="brush: bash;">[/html]
    #!/bin/bash 
    ############################################################ 
    # File: example1.sh                                        # 
    # Author: Jerome DESMOULINS - djeshellstepsATdesmoulins.fr # 
    # Description:                                             # 
    #   DjeShellSteps example 1: sample shell script           # 
    #   with 3 steps.                                          # 
    ############################################################ 
    
    ### Initialisation for environnement variables mandatory for DjeShellSteps ### 
    . `dirname $0`/djeshellsteps.sh 
    
    ### Beginning of Shell Script ### 
    BeginSteps 
    echo "Starting Shell Script..." 
    
    ### Step 10 ### 
    Step 10 "List all files on current directory" 
    if [ $RunThisStep -eq 1 ]; then 
      ls 
    fi 
    
    ### Step 20 ### 
    Step 20 "Sleep for two seconds" 
    if [ $RunThisStep -eq 1 ]; then 
      sleep 2 
    fi 
    
    ### Step 30 ### 
    Step 30 "Display kernel version" 
    if [ $RunThisStep -eq 1 ]; then 
      uname -a 
    fi 
    
    ### End of Shell Script ### 
    EndSteps 

    Retour



    (c) 2005-2025 Jérôme DESMOULINS
    Mentions légales