RDkit: Convert SMILES to canonical

Pipe a SMILES string into Python query to RDkit and prints the result…

echo 'O=C(N)C' | python3 -c "from rdkit import Chem; import sys; print(Chem.MolToSmiles(Chem.MolFromSmiles(sys.stdin.read().strip()), canonical=True))"

"I’ve got a rash, man."