Pagine

domenica 23 ottobre 2011

Script Execution

In order to execute a script you have to perform the following steps:


1)Copy the script in txt file;


2)Rename the file with a proper extension:
      if the script is in python the name will be script.py
      if the script is in bash the name will be script.sh


3)Open the Terminal and change directory where you saved the script;


4)Execute the script:
     if the script is in python type python script.py
     if the script is in bash type bash script.sh

     typing enter the script will be executed.
     In the case of some arguments are request be careful!!


5)In my scripts usually the results will be printed in the terminal as standard outputl. You can redirect the output in a file in this way:
    python script.py > script_results
 

Nessun commento:

Posta un commento