type - Writing shell scripts

28 April 2006   1 comment   Linux


Powered by Fusion×

I've started skimming through the lovely Writing shell scripts tutorial and even though I'm just in the beginning of it I've already learnt one very useful thing: the type program. With it you can find out "what type of command it is". This is useful because sometimes you want to know where some command is coming from. I'll let this example explain its usage:

peterbe@trillian:~ $ type jed
jed is /usr/bin/jed
peterbe@trillian:~ $ type cvs_commit 
cvs_commit is /home/peterbe/bin/cvs_commit
peterbe@trillian:~ $ type alias
alias is a shell builtin
peterbe@trillian:~ $ type sjed
sjed is aliased to `sudo jed'

I'll read more of this after the weekend.


what will i say to u. it is only a task and nothing else

Your email will never ever be published

Related posts

Helpdeskshow - a quick review 26 April 2006
Private functions in Javascript? 29 April 2006
Related by keywords:
Read in passwords with bash 25 March 2005
set -ex - The most useful bash trick of the year 31 August 2014
How I do deployments 16 December 2013
Catching a carriage return in bash 23 October 2006
ztar - my wrapper on tar -z 29 June 2005
To code or to pdb in Python 20 December 2010
Bash tip of the day: ff 25 March 2011
pwdf - a mix of ls and pwd 07 April 2008
File check before delete 07 March 2008
Geeking with Eterm and Tkinter 09 February 2006
Good posture website 02 February 2005