4 ms·
I put my cheat sheet in a folder called ~/bin, which is in my path.
by cabalamat 16y ago
I put my cheat sheet in a folder called ~/bin, which is in my path.
- ciniglio 16y agoCare to share or put them on github or something? You don't need to comment them or anything. I find that looking at other people's scripts really helps me learn new ways to use the shell. Thanks.
- cabalamat 16y agoActually I just checked and there's only one in there -- I guess I use shell scripts a lot less than I used to. Here it is: #!/bin/sh # reform = re-format code to use different indentation # Usage: # reform oldIndent newIndent source destination # # e.g. reform 3 4 fred.py fred1.py unexpand --tabs=$1 $3 | expand --tabs=$2 >$4 Incidently, this is typical shell script for me -- anything that requires loops or control structures, I do in Python. The predominance of comments over code is also typical for me.