[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
Title: | AMIGA NOTES |
Notice: | Join us in the *NEW* conference - HYDRA::AMIGA_V2 |
Moderator: | HYDRA::MOORE |
|
Created: | Sat Apr 26 1986 |
Last Modified: | Wed Feb 05 1992 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 5378 |
Total number of notes: | 38326 |
951.0. "Shell Trix" by DICKNS::MACDONALD (WA1OMM Listening 224.28) Mon Dec 07 1987 13:56
# [ " " --Claude Rains ]
#
# I know there are lots of Shell users out there. I would be interested to see
# what kind of useful aliases/.sh files people have cooked up.
# The following is my offering. This file can be SOURCEd, after removing
# the header and footer. You will also need to put the long lines back
# together. Print, cd, and pop are in two pieces; just join each line with
# the line below it.
# Note the use of '%q foreach i ( $q )' to take advantage of Shell's filename
# expansion. So you can type 'print *.c *.h' or 'lock :.../*' to delete
# protect everything on a disk.
# print files. Not the ideal print spooler, but ok for small files.
alias print "%q i ( $q ) \"date >prt: ; echo $i >prt: ; echo >prt: ;
copy $i prt: ; echo ^l \>prt: \""
# locking and unlocking files. (more than one at a time)
alias lock "%q foreach i ( $q ) \"protect $i rwe\""
alias unlock "%q foreach i ( $q ) \"protect $i rwed\""
# remove--overide delete protection.
alias rmx "%w unlock $w ; rm $w"
# multi-colored current directory prompt (my favorite)
alias cd "%i \\cd $i ; strhead dev : $_cwd; strtail path : $_cwd;
set _prompt ^[[32m$dev:^[[33m$path^[[32m \\> ^[[31m "
# push and pop directories
alias pop "strhead _cwd ~ $popdir ; strtail popdir ~ $popdir ;
cd >nil: $_cwd ; pwd >nil: ; c >nil: ""
alias push "%q set popdir $_cwd~$popdir ; c $q"
# I use these on Shell V2.7m. I've used most of them on earlier versions,
# but I don't know if I've modified them since, so I can't promise they'll
# work on earlier version.
# By the way, Thanks, Matt and Steve!!! I would be lost without your Shell!
T.R | Title | User | Personal Name | Date | Lines |
---|
951.1 | | LA780::BAGUE_KE | Open the pod bay doors, HAL.......... | Fri Feb 26 1988 23:14 | 4 |
| I am greatly interested in trying out the hacks you suggested, but
being new to the amiga editor I don't understand how you're supposed
to join together long lines. What is the amiga equivalent of the
VMS command line continuation character "-"?
|