Using API to create easy access to a dictionary from terminal/shell in Linux
- Open dict.sh
- Change the path in the file with the path of your python file
- Add export set PATH=$PATH:/yourpath in the end of your .bashrc file (in home directory) replacing yourpath by the path to your directory where dict.sh lies
- Add alias dict='dict.sh' in the end of your .bashrc file
- make dict.sh executable by typing chmod u+x dict.sh
- Type dict yourword and results will be printed
Edit: if this doesn't work, write ./dict.sh instead of dict.sh in alias in point 4. Something like this 4. Add alias dict='./dict.sh' in the end of your .bashrc file