Notebook: for all those technical problems that I keep solving, however they keep showing up: pro-memoria

 bash iterate line per line from text file, split by tab

We read line by line, the trick is to remove "\r" otherwise we can have problems using the strings. Also check what "%" is used for in bash.

while IFS=$'\t' read -r -a line
do
  line=${line%$'\r'} # make sure to remove "\r"
  echo ${line[0]} ${line[1]} ${line[2]} # field1, field2, field3 from runs.tab line
done < "runs.tab"

 replace comma by tab in text files

sed 's/\,/\t/g' file.csv

 git status hangs, if you have several untracked files

git status -uno
git commit -a -uno

 Apache authentication with folder listing

First create new file containing username and password:

htpasswd -c filename username

Then allow .htaccess to override directory options:

<Directory /var/www/folder>
Options Indexes FollowSymLinks
AllowOverride all
Order allow,deny
allow from all
</Directory>

And lastly, put a .htaccess inside your folder:

AuthType Basic
AuthName "Name"
AuthBasicProvider file
AuthUserFile /path/to/pass_file
Require user username
IndexOptions IgnoreCase FancyIndexing FoldersFirst NameWidth=* DescriptionWidth=* SuppressHTMLPreamble