The following one-liner can be used to extract the delimiter of a CSV file. This command does not work on TAB separated files. It only works on delimited files whose field separators are not whitespaces. $ head - n1 bookmerged . csv | tr - d '[a-z][A-Z][0-9]' | \ tr -d '"' | sed 's/.\{1\}/&\n/g' | sort - r | uniq - c | \ sort - nr | tr - s " " | cut - d " " - f3 | head - n1 This command generates a list of special characters and from that list selects the character with the highest frequency of occurrence. This character must be the delimiter of the file unless some other special character is used heavily. This code will fail when other special characters have a higher frequency of occurrence than the delimiter. An explanation of this code is as follows. After head grabs the column headers, the first two trace commands (tr) removes all alphabets, numbers, and quotes. This leaves a bunch of s...