some ksh aliases and functions
Larry Cipriani
lvc at cbscc.UUCP
Fri Oct 5 22:22:38 AEST 1984
Would anyone have any ksh functions/aliases they'd like to post.
Here's some I use all the time; fairly simple minded but very useful.
These use Unix* 5.0 commands.
alias -x ag='alias | fgrep'
alias -x all='find . -print'
alias -x l='ls -l'
alias -x lp='/usr/bin/lp -dcent'
alias -x lpstat='/usr/bin/lpstat -o | grep -v "^-0"'
alias -x news='readnews -n cb.general scc.general \
scc.darn scc.generic net.sources'
alias -x profile='. ~/.profile'
alias -x reset='. ~/.aliases'
alias -x smail='/usr/mail/PCS/bin/smail +edit'
alias -x ti='/usr/bin/lp -dti'
alias -x ul='print -n "User load:" ; who | wc -l'
alias -x wg='who | grep'
alias -x which='print "You are on cbscc"'
alias -x xpr='/usr/lbin/xpr -!Ehjw120'
# look for a string in the password file (this will need to be
# modified for use on non-SCCS password files)
function whois
{
for i in ${*}
do
grep ${i} /etc/passwd | \
sed -e s/.*:unix-// -e s/:$// -e s/5947[0-9].*://p
done
}
# make a directory && change to it && pwd
function mc
{
case ${#} in
1 ) mkdir ${1} && cd ${1} && pwd
;;
* ) print - "usage: mc directory"
;;
esac
}
More information about the Comp.sources.unix
mailing list