Einträge über Bash

My GNU Autohell Story

In academic software development I have seen one software suite which was known to be hard to compile. I was tasked to do try it, and ended up writing a 1200 line Bash script which took care of all the edge cases.

Weiterlesen…

Bash and Spaces in File Names

On LinkedIn one can specify skills that one has as a collection of keywords. Contacts can verify these skills by vouching that one has them. A recently added feature is that one can take a 15 question multiple choice test and show a badge if the test result lies in the 0.7 quantile or above. In principle a nice idea.

Weiterlesen…

Directories for bashrc and vimrc

I used to have .bashrc file with around 400 lines. With ASCII boxes, it was kind of manageable, but it was rather a bunch of little snippets that lack cohesion. So I took inspiration from the various configuration directories (config.d/) of packages like apache and put each snippet into a little 10-name.sh file into ~/.config/bash/. Then in my .bashrc, I just source all those little snippets. Since the globbing gives them in alphabetical order, I can use the number to give the snippets an order.

Weiterlesen…

Color Hostname

I often have a lot of SSH shells open at a time, and it is not easy to distinguish between the different hosts on the first glance. I usually have a mu@hostname like prompt, but I often started to type in the wrong terminal.

Weiterlesen…

Version Control Display In Shell Prompt

Version control is a neat thing when programming, but I sometimes forget which project uses which system. All of my projects use git, some others use SVN, Mercurial or Bazaar. When I work on the command line, I would like to know whether the current directory is version controlled and which system is used.

Weiterlesen…