I have a shell script that takes a file and uses "syncsort" to sort contents.
I want to add a condition to check whether the input file is textual or binary format. If textual, the "syncsort" will be used to sort the files contents. Otherwise, the sorting process will be skipped.
Note that the input file extension will be always fixed and cannot be used to determine the file content type.
Below is partial content of the shell script file.
cd ${homedir}
# I want to add the if condition here
syncsort /INFILE ${infile} reclegnth 20 /OUTFILE ${infile}.out OVERWRITE
# if ends here