#!/bin/bash if [ ! -z "$1" ] && [ $1 == "-h" ]; then echo "1st param optional: dir of output" echo "i.e.: targit2dir " elif [ -z "$1" ]; then echo "1st param optional: dir of output" echo "i.e.: targit2dir " elif [ ! -z "$1" ]; then #echo $1 ls *.git.tar.gz | xargs -l tar -C $1 -xvzf else ls *.git.tar.gz | xargs -l tar -xvzf fi