#!/bin/bash # # # keep a log named by time stamp export PATH=:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin set -u app=${0##*/} mkdir "mod_lists" pathto=mod_lists timename=$(date +"%m-%d-%Y_%H-%M-%S") out=$HOME/Documents/Documents/hogan/$pathto/$timename.log if [ 1 -eq 1 ] ; then echo "basename dollar sign zero is" $app echo "path is" $pathto echo "Munged time is" $timename echo "out fn is $out" echo "Time is $timename " > "$out" fi # end if [ 1 -eq 0 ] declare -ir SUCCESS=0 declare -ir E_FATAL=1 pwd | tee -a "$out" echo "installing useful packages:" | tee -a "$out" sudo perl -MCPAN -e 'install Bundle::CPAN' | tee -a "$out" ./1.mod.pl | tee -a "$out" echo "end of output" | tee -a "$out" gedit $out & read -n 1 echo "duration=$SECONDS" | tee -a "$out" date | tee -a "$out" exit $SUCCESS