Cygwin Commands for Text Manipulation
DOS has a few commands like find, findstr and sort which can be used to manipulate text. ($ help <cmd> shows the usage help for all these commands.) However, their usage is very different from those that a Unix user may be familiar with.
One of the best things about Cygwin is that these commands useful for “quick and dirty” work on large chunks of text data are easy to learn, are consistent across all Unix-based OSs, have a number of options, and are quite extensive. When used in combination, they can save a lot of programming.
($ <command> <option> <inputs> is …read more
POSIX and PATH
It has been nearly two months since I introduced Cygwin. We’ve seen how to install Cygwin, customize the terminal, a few text editors and a tabbed terminal emulator. Enough with the playfulness. One final configuration and let us move on to the geekier fun.
Directory Structure
Cygwin uses the POSIX notation standard in paths. That is, instead of ‘\’ as in Windows, it uses the more convenient ‘/’ as in Unix. The web follows the same notation. For instance, take http://thatdamnpc.com/category/cygwin-unix. On the web host, one might find a directory called “category” in the main directory and a sub-directory “cygwin-unix” along with …read more
Poderosa: The Terminal Emulator
The terminal is an important aspect of Cygwin like for any Unix-based OS. For this reason, you might see its users like me chasing after fancy ways of beautifying it. Well, I will try to make this the last time.
Poderosa is the best terminal emulator for Cygwin that I have come across. It has a tabbed GUI, much like the PuTTY Connection Manager. However, in addition to the network communication protocols through which one can connect to a remote system using PuTTY, local Cygwin shells can also be opened using Poderosa. I use it mainly for the latter purpose.
Poderosa allows …read more
PuTTY Connection Manager for Tabbed PuTTY
PuTTY is a free Windows client that allows users to log into remote systems through raw, Telnet, SSH, remote login, and serial connections. It is primarily used for logging into UNIX systems through Telnet and SSH, and at 444KB (direct executable) is very popular with UNIX lovers even though its last version of 0.60 beta has not been updated in nearly two years.
I recently discovered that there is a tabbed version of PuTTY called the PuTTY Connection Manager allowing multiple PuTTY instances in a single window.
PuTTY Connection Manager has several other features like workspace customizations, auto-login and post-login commands, Import/Export …read more
Tech Channel Roundup From Steve Jobs to Steve Ballmer
First Juan was not excited about this year’s MacWorld. Then he worried about Steve Jobs’ hormone imbalance, which I must say is something only Apple lovers are capable of. Now, after watching MacWorld ‘09, he decides that Phil Schiller’s keynote was just fine.
Jason, celebrating his three-year anniversary at Microsoft Weblog, sees a surge in Zune’s popularity since the 30GB Zune owners started experiencing widespread failure and Microsoft subsequently updating them about its fix. He still wants to buy Zune, but do you recommend it?
Clair introduces us to a cool terminal user whom all lovers of CLI can follow on Twitter …read more
Customizing the Cygwin Terminal
Cygwin loads its settings from a file called .profile present in the HOME environment variable. By default, HOME is set to /home/<username> which in Windows can be reached in C:\cygwin\home\<username> (assuming you have installed Cygwin in C:\cygwin folder).
.profile can be opened using any text editor. Here you can set colors to be displayed, prompt, history, aliases, default working directory, and any banner you may wish. The colors you choose will interfere with the colors set in your command prompt.
Below is a sample .profile.
————————————————————————————————–
# .profile
# Define some colors first:
red=’\e[0;31m'
RED='\e[1;31m'
green='\e[0;32m'
GREEN='\e[1;32m'
yellow='\e[0;33m'
YELLOW='\e[1;33m'
blue='\e[0;34m'
BLUE='\e[1;34m'
pink='\e[0;35m'
PINK='\e[1;35m'
cyan='\e[0;36m'
CYAN='\e[1;36m'
NC='\e[0m'
# Colors and Prompt
export PS1="\[\e]2;\u@\h:\w\007$green\]\u@\h:\[$pink\]\w\[$blue\]$ \[$BLUE\]“ # Word wrap of previous line.
set -o …read more
Windows, Other Operating Systems, Cygwin
The Windows operating system is very different from most other operating systems. Red Hat Linux, GNU/Linux, Ubuntu, Debian, SUSE share some core philosophies with UNIX, and are thus called Unix-based OSs. In that way, they all follow a common set of standards which are very unlike Windows’ own and that is one of the reasons for the wide-spread anti-Windows sentiment.
Windows is primarily popular for its apparent user-friendliness. Unix-based OSs are chosen for their open and active communities. Windows is sufficient for ‘general purposes’ like listening to songs, playing games, making documents, sending mail, browsing the Internet. Unix-based OSs may seem more …read more




