CoCalc Public FilesAutumn2015 / Week8 / codecount.shOpen with one click!
Author: Matthew Parker
Views : 48
Description: count lines of code in ipynb
Compute Environment: Ubuntu 18.04 (Deprecated)
1
#!/bin/bash
2
3
# count the lines of code in an .ipynb file
4
5
jupyter nbconvert --to python --stdout $1 |\
6
sed -e 's/^[ \t]*//' -e '/^$/d' |\
7
grep -v '#' |\
8
wc -l