Skip to content

Instantly share code, notes, and snippets.

@aldrinmartoq
Last active April 20, 2016 14:54
Show Gist options
  • Save aldrinmartoq/fb22772262b7af8c7059bb6c0a352a42 to your computer and use it in GitHub Desktop.
Save aldrinmartoq/fb22772262b7af8c7059bb6c0a352a42 to your computer and use it in GitHub Desktop.
Ejemplo correr script bash con log
#!/bin/bash
export DISPLAY=:0
cd $(dirname "$0")
# tira la salida std y err de este script a este archivo
exec >> spension.log 2>&1
# que muestre los comandos
set -x
# marca ini
INI=$(date +%s)
echo ==== INI $INI == $(date) ====
ruby vc_historical.rb
ruby vc_this_year.rb
ruby vc_this_month.rb
python cleancsv.py
python curator.py
# marca fin
FIN=$(date +%s)
echo ===== FIN $FIN == $(date) ===== $[$FIN-$INI] segundos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment