Sunday, September 30, 2012

Shorter commands on Debian Linux

I thought it made my life easier by adding the environment variables.

Adding environment variables was a good thing for saving the typist's time.

I typed:

nano /etc/profile

I added:

PATH=$PATH:/usr/local/pgsql/bin/

export PATH





When starting PostgreSQL, instead of using:

/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start

(69 characters including spaces)


I used:

pg_ctl -D /usr/local/pgsql/data -l logfile start

(48 characters including spaces)

[(69-48)/69*100]% = 30.4%

The number of characters decreased by 30.4% after adding the environment variables!

This meant less confusion when a human being read the line.






No comments: