Tuesday, October 11, 2011
Priming the pump
I made some progress on a simple side-project of mine on Sunday and it has set up an unusually productive week on my full-time job. Progress is a habit, and progress breeds progress. If you feel stuck on a project/startup, accomplish something a little bit easier to get yourself unstuck.
Sunday, October 9, 2011
Make portable shell scripts
Here's a nifty tip from Wikipedia about making your shell scripts portable across different systems.
The problem with scripts that use the hashbang symbol to specify the interpreter that should be used to run them at the top of the file is that the interpreter may be in different places on different systems. For example, on my desktop the python interpreter is located at
/usr/bin/env will (usually) look up the correct interpreter location for the system.
The problem with scripts that use the hashbang symbol to specify the interpreter that should be used to run them at the top of the file is that the interpreter may be in different places on different systems. For example, on my desktop the python interpreter is located at
/usr/local/bin/pythonwhile on my server it is at
/usr/bin/python. To solve this problem, use the following line instead:
#!/usr/bin/env python
/usr/bin/env will (usually) look up the correct interpreter location for the system.
Subscribe to:
Posts (Atom)