Technology Insights

cut – Represent A Tab As The Delimiter With Linux cut Command

I have been using the cut command a lot recently to shed extra data from large text files. I typically use cut with a specific delimiter by activating the -d switch and I thought that the -d switch was required. It turns out that -d is not required and by default -d actually defaults to the delimiter being a tab. When you need to have a tab as the delimiter for cut you simply don’t specify the -d switch. Below I show a couple examples of a file trimmed down using cut with and without the -d switch as well as another way to convert tabs in a file to spaces which then will allow you to use the Linux cut command with the -d” ” switch.

Code Snippets

Represent A Tab When Using sed Find/Replace

The other day I needed to create a RightScript shell script that would update a couple configuration files on a server that was being launched in the RackSpace Cloud via RightScale. I decided to use SED to find and replace content within the configuration files. The first pass at the script failed because what I thought were spaces ended up being tabs. Use the information below to represent a tab within a shell script when using sed.

Technology Insights

How To Close A Window In Windows Without A Mouse

Similar to the situation I described in yesterdays article I was working on a computer with Windows XP Home Edition this past weekend and the mouse or touchpad was not working. I had navigated through various windows, control panels, etc. and needed to close some of them so I could continue. The problem was that I didn’t have a mouse and I was unable to tab to the red X in the top right corner to close the window. Use the information below to close windows on any Windows machine without a mouse installed.

Technology Insights

Windows 7: Turn Off Ding When Using Tab Via SSH Sessions

This is something that came up earlier today with a friend of mine and decided it might help someone else in the future so I should note it. The sound I am talking about disabling is the default ding on Windows that occurs for many reasons but specifically if you are SSH’d into a server using console or a client such as SecureCRT and you hit tab twice in a directory to list all of the files you will hear a “ding” sound. This can be quite annoying depending on how often you use tab or if you work in the same office area as someone else. Below is information on how to disable the default ding in Windows 7.

Technology Insights

How to Add Tab Complete to Vim Search

I recently started using the Vim editor again. It used to be my favorite because of all the great plugins. I have been getting lazy the past year and have been using nano but recently I had to work on a few systems which only had vim and I was not able to install another editor. I am am going to write a few article’s on my favorite plugins.

Tab complete is probably the best thing about linux and the shell so it only makes sense to be able to use it with vim. Adding this plugin makes it possible to tab complete while using the / to search in vim. Below I will show how to add plugins to vim.