diff options
author | sinanmohd <sinan@firemail.cc> | 2023-07-30 19:19:58 +0530 |
---|---|---|
committer | sinanmohd <sinan@firemail.cc> | 2023-07-30 19:20:06 +0530 |
commit | ae5c63b653aaa60ca15e83e821c47802578d0814 (patch) | |
tree | 3779dec4be2a634de693a7bd87886ef09a9cd690 | |
parent | c82316419babd2af9e7ef5bf11a5bbd1e8d672d1 (diff) |
-rwxr-xr-x | bin/ctov.sh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/bin/ctov.sh b/bin/ctov.sh index 018b70c..10b8d33 100755 --- a/bin/ctov.sh +++ b/bin/ctov.sh @@ -69,9 +69,11 @@ while getopts "hf:" f; do esac done -if [ -n "$file" ] && - [ "$(file --brief --dereference --mime-type "$file")" != "application/csv" ]; then - die "input is not a csv file" +if [ -n "$file" ]; then + case "$(file --brief --dereference --mime-type "$file")" in + *"/csv") ;; + *) die "input is not a csv file" ;; + esac fi while read -r entry; do |