checking to see if an arg is a file and printing accordingly
checking to see if an arg is a file and printing accordingly I have the following code that takes in a file via an arg and if none exists, take it from stdin: file= column= pattern= path= cmd="echo" while getopts "f:c:e:" opt; do case $opt in f) file="$OPTARG";; c) column="$OPTARG";; e) pattern="$OPTARG";; *) echo "Usage: …