27 lines
682 B
Bash
Executable file
27 lines
682 B
Bash
Executable file
#!/bin/bash
|
||
|
||
# Replace Unicode characters with their ASCII counterparts
|
||
# Usage: ./replace_unicode_with_ascii.sh < input_file
|
||
|
||
# Read the input from standard input and replace Unicode characters with their ASCII counterparts using a single sed command
|
||
sed -e "s/[‘’]/'/g" \
|
||
-e 's/[“”]/"/g' \
|
||
-e 's/…/.../g' \
|
||
-e "s/[–—]/-/g" \
|
||
-e 's/ / /g' \
|
||
-e 's/«/"/g' \
|
||
-e 's/»/"/g' \
|
||
-e "s/‹/'/g" \
|
||
-e "s/›/'/g" \
|
||
-e 's/„/"/g' \
|
||
-e 's/“/"/g' \
|
||
-e "s/‚/'/g" \
|
||
-e "s/‘/'/g" \
|
||
-e 's/„/"/g' \
|
||
-e 's/“/"/g' \
|
||
-e "s/‚/'/g" \
|
||
-e "s/‘/'/g" \
|
||
-e 's/•/*/g' \
|
||
-e 's/·/*/g' \
|
||
-e 's/×/*/g'
|
||
|