Setting PATH environment variable in OSX permanently

I have read several answers on how to set environmental variables on OSX as permanently. First, I tried this, How to permanently set $PATH on Linux/Unix? but I had an error message saying no such file and directory, so I thought I could try ~/.bash_profile instead of ~/.profile but it did not work. Second, I … Read more

What is the reason for performing a double fork when creating a daemon?

I’m trying to create a daemon in python. I’ve found the following question, which has some good resources in it which I am currently following, but I’m curious as to why a double fork is necessary. I’ve scratched around google and found plenty of resources declaring that one is necessary, but not why. Some mention … Read more

Sorting a tab delimited file

I have a data with the following format: foo<tab>1.00<space>1.33<space>2.00<tab>3 Now I tried to sort the file based on the last field decreasingly. I tried the following commands but it wasn’t sorted as we expected. $ sort -k3nr file.txt # apparently this sort by space as delimiter $ sort -t”\t” -k3nr file.txt sort: multi-character tab `\\t’ … Read more