[ Scripts ] [ Aliases ]
A shell script frontend for the most common uses of tar: creating, unpacking and listing contents of tar archives.
Download. Documentation: HTML / manpage (gzipped)
When using a dial-up connection, internet providers usually assign a different IP from their pool to the machine dialling in. To quickly get at the current IP one can use ifconfig and extract the IP from the command's output by using pattern matching.
alias myip='expr "`/sbin/ifconfig`" : ".* inet addr:\([^ ]*\) P-t-P:.*"'
To locate the command that will be executed when its name is typed in the shell, one can use which(1) (bash: type -p can be used as a substitute): which commandname looks for the program called commandname along the search path and displays the first hit (if any). However, aliases and shell functions are not taken into account (tcsh has a builtin which that does this). Also, only the first hit along the search path is shown, even if there are several instances in different directories of the search path (such as, for example, in /usr/bin as well as /usr/local/bin). The command where serves to show all these (again, tcsh has a builtin version).
alias where='type -a'
Aug 30, 2001