-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathspell_check
More file actions
executable file
·26 lines (22 loc) · 828 Bytes
/
Copy pathspell_check
File metadata and controls
executable file
·26 lines (22 loc) · 828 Bytes
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
#!/usr/bin/bash
# Check if 'parallel' is installed
if ! command -v parallel &>/dev/null; then
echo "'parallel' is not installed. Installing it..."
# Check which package manager is available and use the appropriate command
if command -v apt-get &>/dev/null; then
sudo apt-get update
sudo apt-get install parallel -y
elif command -v yum &>/dev/null; then
sudo yum install parallel -y
else
echo "Unsupported package manager. Please install 'parallel' manually."
exit 1
fi
if [ $? -eq 0 ]; then
echo "'parallel' has been installed successfully."
else
echo "Failed to install 'parallel'. Goodbye :)"
exit 1
fi
fi
find . -name "*.py" | sed 's|^\./||' | parallel python3 main.py -f | parallel --colsep ',' "grep -Fxq '{1}' british-english || echo ERROR {3}:line {2}. {4} {5} contains an invalid word: {1}"