Browsing All Posts filed under »Unix«

New Life for Old Laptop

May 24, 2012

0

In this article, I am going to discuss ways I gave my five-year-old laptop a new life. In 2007, I purchased a used laptop to learn .NET programming. Since it was an old laptop, the machine barely had enough horse power to run Windows Vista. Soon, my job no longer require .NET programming, I promptly […]

My Brief BSD Adventure

August 1, 2011

0

I was bored. My old laptop has been running Linux Mint for a while and now I want something different so I checked out BSD, PC-BSD to be more specific. In the past, I have been flirting with BSD several times, and ended up abandon BSD for Linux. This time is no exception. Before going […]

Better Font and Color for tkcon in Linux Mint 11

July 2, 2011

0

The Problem In Linux Mint, the default font and background color for tkcon is terrible. I want to change that to something easier to read. The Solution Here is my ~/.tkconrc, which fixes it by choosing a better font and background color: Discussion The default font in Linux Mint is terrible: it is hard to […]

Automatically List a Directory’s Contents After Changing Dir

April 26, 2011

0

The Problem After the cd command, the next command is almost always ls so we want to combine the two to automatically issuing the ls command right after the cd command. The Solution In bash, add the following line in either ~/.bash_profile or ~/.bashrc: If you are using csh or tcsh, add the following line […]

Squeeze Multiple Blank Lines within vim

March 10, 2011

2

The Problem I want to squeeze multiple blank lines into just one while editing in vim. I often receive source code which the author used multiple blank lines to separate functions. I don’t mind if functions or code block are one or two lines apart, but I have seen sources where functions are four or […]

How to Configure WGet to Work with Proxy Server

April 14, 2010

0

The Problem I want to configure WGet to go through a proxy server without having to specify that on the command line The Solutions The first solution is easy: I can set a shell variable called http_proxy. Here is an example in bash: Another solution is to place this information in a configuration file called […]

Simple Menu with Bash’s Select Command

September 10, 2009

5

The Problem Sometimes, I need a simple menu in bash, but I don’t want to spend a good deal of time coding for one. The Solution Bash has a built-in command called select which gets the job done. To demonstrate this command, I am going to write a short bash script. This script lists all […]

Changing Directory Listing (ls) in RHEL

September 3, 2009

0

This is a follow-up to my previous post. The Problem The ls command in Redhat Enterprise Linux (RHEL) by default uses the dark blue to show directories. This color is hard to see, especially on laptops with dim screens. I would like an easy way to change that. The Solution The solution is similar to […]

Display Weather from Command Line

May 8, 2009

0

Since I work on Linux/OSX command line all day, I prefer to get my information such as stock quote or weather via command line. Here is a script to do that. A couple of notes: I use curl instead of the TclCurl package because my system does not come with TclCurl The script employs Google […]

View Stock Price Using Command Line

May 6, 2009

2

I live on command line all day, so it is convenience to perform many tasks using the command line. One of those is to check stock price: curl -s 'http://download.finance.yahoo.com/d/quotes.csv?s=csco&f=l1' The above command check for the last price (with some delay) of Cisco Systems. If you want to check the price for other tickers, replace […]

Follow

Get every new post delivered to your Inbox.

Join 34 other followers