URL: http://linuxcommand.org/writing_shell_scripts.php

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.

Comments

Anonymous

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

Your email will never ever be published.

Previous:
Helpdeskshow - a quick review April 26, 2006 IssueTrackerProduct
Next:
Private functions in Javascript? April 29, 2006 Python, Web development
Related by category:
set -ex - The most useful bash trick of the year August 31, 2014 Linux
brotli_static in Nginx November 8, 2024 Linux
Be very careful with your add_header in Nginx! You might make your site insecure February 11, 2018 Linux
Linux tip: du --max-depth=1 September 27, 2007 Linux
Related by keyword:
set -ex - The most useful bash trick of the year August 31, 2014 Linux
How to intercept and react to non-zero exits in bash February 23, 2023 Bash, GitHub
Run something forever in bash until you want to stop it February 13, 2018 Linux
How to count the most common lines in a file October 7, 2022 Linux, Bash, macOS