#! /bin/tcsh -f # t_zipc 4.0 # Unzips any gzipped files in the directory specified by $1 # Uses code from do_zipc script # Adaptation by Paul O'Neill # Date in final form: 17 December 2004 ######################################################################################## # Welcome ######################################################################################## echo "" echo "gnt_infrm (t_zipc) ++++++++++++++++++++++++++++++++++++++++++++++++++++++" echo "gnt_infrm (t_zipc) t_zipc 4.0 STARTED "`date` echo "gnt_infrm (t_zipc) ++++++++++++++++++++++++++++++++++++++++++++++++++++++" echo "" ######################################################################################## # Get parameters ######################################################################################## set THEDIR = $1 # directory to check for zipped files ######################################################################################## # Look for files and unzip ######################################################################################## set gzipped = `ls -1 $THEDIR | grep ".gz"` # look for gzipped files if ( $#gzipped != "0" ) then echo "gnt_infrm (t_zipc) Gunzipping all gzipped files in $THEDIR" gunzip -qf $THEDIR/*.gz else echo "gnt_infrm (t_zipc) No gzipped files in $THEDIR" endif ######################################################################################## # All done ######################################################################################## echo "" echo "gnt_infrm (t_zipc) ++++++++++++++++++++++++++++++++++++++++++++++++++++++" echo "gnt_infrm (t_zipc) t_zipc 4.0 FINISHED "`date` echo "gnt_infrm (t_zipc) ++++++++++++++++++++++++++++++++++++++++++++++++++++++" echo ""