| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function tcar_printFile { |
| |
| |
| |
| |
| |
| local FILE="${1}" |
| |
| tcar_checkFiles -ef ${FILE} |
| |
| if [[ $(/usr/bin/file -b -i ${FILE}) =~ '^application/x-gzip$' ]];then |
| /bin/zcat ${FILE} |
| elif [[ $(/usr/bin/file -b -i ${FILE}) =~ '^application/x-bzip2$' ]];then |
| /bin/bzcat ${FILE} |
| else |
| /bin/cat ${FILE} |
| fi |
| |
| } |