terminal

Image of a terminal prompt

Pro Tip: For, While and Until Loops

LEVEL: SYSADMIN / TIME: 1-2 min. Here’s some handy quick reference examples to go back to easily if you are needing to use for, while and until loops in your bash shell scripts. This is perfect for bookmarking and coming back to at a later date. I am always forgetting the subtle syntax differences that bash has, compared to other languages I use, for example C, PHP, Python etc. Before I show you the examples,…


Multi-Tasking at the command line with screenie

The use of the tool screen is well documented throughout the Internet, however it’s third-party accomplice is not. Screenie is a front-end to screen. Why Do I want to know about this? Using the command line can be done in a few ways – for one, you can work at the Linux console (i.e., not within the X Window Environment, so you are forced to use the virtual consoles – tty/vty 0-9, which can ordinarily…


Using Vim Scripts to determine whether to set 80 chars word wrap

Here’s a little quick tip for those of you out there that use the ViM text editor. The following is from my personal ~/.vimrc file, it is used to set 80 column word wrap. In other words when the cursor gets to the end of a standard 80 column display, it wraps onto a new line. This is great if you use Vi to post emails or to newsgroups. Bad if you write code in…