Last active
April 18, 2023 17:52
Command to pretty-print Windows %PATH% using Batchfile and Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python -c "from sys import argv; print(''.join(argv[1:]).replace(';', '\n'))" %PATH% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
python -c
Run the following command in Python.''.join(argv[1:])
Takes all the following arguments and puts them into one string..replace(';', '\n')
Takes that string and replaces the semicolons with newlines.