-
Notifications
You must be signed in to change notification settings - Fork 2
/
clean_history_chars
executable file
·39 lines (34 loc) · 921 Bytes
/
clean_history_chars
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env bash
FILE=${1:-$HOME/.zsh_history}
sed -i 's/´/e /g' "$FILE"
sed -i 's/â/â/g' "$FILE"
sed -i 's/ê/ê/g' "$FILE"
sed -i 's/ú/ú/g' "$FILE"
sed -i 's/Ã/Ã/g' "$FILE"
sed -i 's/ÃÂ/Ã/g' "$FILE"
sed -i 's/ç/ç/g' "$FILE"
sed -i 's/ã/ã/g' "$FILE"
sed -i 's/ó/ó/g' "$FILE"
sed -i 's/á/á/g' "$FILE"
sed -i 's/é/é/g' "$FILE"
sed -i 's//á/g' "$FILE"
sed -i 's/[/[/g' "$FILE"
sed -i 's/â/a/g' "$FILE"
sed -i 's/Â/a/g' "$FILE"
sed -i 's/ê/e/g' "$FILE"
sed -i 's/Ê/e/g' "$FILE"
sed -i 's/ú/u/g' "$FILE"
sed -i 's/Ú/u/g' "$FILE"
sed -i 's/Ã/i/g' "$FILE"
sed -i 's/Ã/i/g' "$FILE"
sed -i 's/ç/c/g' "$FILE"
sed -i 's/Ç/c/g' "$FILE"
sed -i 's/ã/a/g' "$FILE"
sed -i 's/Ã/a/g' "$FILE"
sed -i 's/ó/o/g' "$FILE"
sed -i 's/Ó/o/g' "$FILE"
sed -i 's/á/a/g' "$FILE"
sed -i 's/Ã/A/g' "$FILE"
sed -i 's/é/e/g' "$FILE"
sed -i 's/É/e/g' "$FILE"
sed -i -e '/^[^:]/d' "$FILE"