Skip to content

Instantly share code, notes, and snippets.

@etigui
Last active October 30, 2019 14:01
Show Gist options
  • Select an option

  • Save etigui/4e91ce95157a9293d4f1a93ef17f6c3a to your computer and use it in GitHub Desktop.

Select an option

Save etigui/4e91ce95157a9293d4f1a93ef17f6c3a to your computer and use it in GitHub Desktop.
Bash: comment all python file lines
# One line (console)
while IFS= read -r line; do echo "# $line" >> output_commented.json; done < input.json
# Indented
while IFS= read -r line;
do
echo "# $line" >> output_commented.py
done < input.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment