Bash Pipe Handling

I decided to write a slightly more detailed explanation. The “magic” here lies in the operating system. Both programs do start up at roughly the same time, and run at the same time (the operating system assigns them slices of time on the processor to run) as every other simultaneously running process on your computer … Read more

Permission denied when launch python script via bash

You should be able to run the script typing: $ chmod 755 ./scripts/replace-md5sums.py $ ./scripts/replace-md5sums.py There are times where the user you are currently logged with just don’t have the permission to change file mode bits. In such cases if you have the root password you can change the file permission this way: $ sudo … Read more

Git command line – know if in submodule?

(Update April 2017 for Git 2.13, Q2 2017) There is now an official command to determine if a repo is a submodule of a parent repo: cd /path/to/potential/submodule/repo git rev-parse –show-superproject-working-tree See commit bf0231c (08 Mar 2017) by Stefan Beller (stefanbeller). (Merged by Junio C Hamano — gitster — in commit 3edcc04, 17 Mar 2017) … Read more

execute Bash command from IPython

Fernando Perez, creator of IPython, suggests this: In [1]: %%bash . ~/.bashrc <my_fancy_bash_function> <function_argument> This works on the current stable version (0.13.2). He admits that’s a bit clunky, and welcomes pull requests. . .