How do I remove special characters from a string in Linux?
The first tr deletes special characters. d means delete, c means complement (invert the character set). So, -dc means delete all characters except those specified. The n and r are included to preserve linux or windows style newlines, which I assume you want.
How do I remove special characters from a CSV file in Unix?
- iconv (internationalization conversion) Here is a solution using iconv: iconv -c -f utf-8 -t ascii input_file.csv. …
- tr (translate) Here is a solution using the tr (translate) command: cat input_file.csv | tr -cd ‘