#!/bin/csh -f # stdcshrc.csh Fred Stluka # ----------------------------------------------------------------------------- # This script is the part of my .cshrc which is entirely portable UNIX. # Since it doesn't contain any Aegis commands, it can be used on the # Gould as well as the Apollos. # ----------------------------------------------------------------------------- # RCS Header: # $Header: //neptune/local/stluka/com/RCS/stdcshrc.csh,v 1.16 90/01/10 10:10:38 stluka Exp Locker: stluka $ # $Source: //neptune/local/stluka/com/RCS/stdcshrc.csh,v $ # $Locker: stluka $ # # Revision History: # $Log: stdcshrc.csh,v $ # Revision 1.16 90/01/16 17:58:39 stluka # - Added "from" alias. # - Added "unleave" alias. # # Revision 1.15 89/11/17 15:40:05 stluka # - Created "rm" alias with -i option to prompt before removing each file. # - Eliminated "more" alias with -c option. # - Modified "confirm" alias to echo find command. # - Added time (at time of cd command) to prompt. # # Revision 1.14 88/12/07 13:32:38 stluka # - Modified newdir to do exact same operation more efficiently (used [] to # select first word of wordlist instead of awk to select first word of # string. Thanks to Aaron Temin for help. # # Revision 1.13 88/12/07 13:08:10 stluka # - Modified newdir to report entire current directory without expanding # tilde, and without reporting entire directory stack. # # Revision 1.12 88/12/06 18:37:10 stluka # - Modified newdir alias to report entire current directory (not only last # word). Had to use dirs instead of pwd to avoid ~ expansion. But dirs # reports all stacked directories, not just current one. Tried with no # luck to use awk on dirs output to get first directory. Always got # either all directories, or tilda-expanded first one. Gave up and left # it as it is, reporting all directories in prompt string. # # Revision 1.11 88/12/06 18:25:01 stluka # - Added set time command. # # Revision 1.10 88/11/03 18:46:42 stluka # Moved CSHRC_ALREADY_RUN section to .cshrc file. # # Revision 1.9 88/10/27 21:19:08 stluka # Added -f to top line to prevent implicit execution of .cshrc file. # Added CSHRC_ALREADY_RUN section which executes only once per process tree. # Put path setting in this part to avoid accidentally resetting it inside # each script (since a script runs in its own shell). Now if I change the # path it will stay changed for subsequent commands whether they are issued # directly or from a script. # Added Dave Andrews style nesting level counter to prompt. # Added comments. # # Revision 1.8 88/10/26 19:59:56 stluka # Added editpath alias. # # Revision 1.7 88/10/10 12:11:48 stluka # Complete reorganization of contents. Added lots of comments. # Created interactive-only part (if $?prompt...) to hold some stuff, since this # script is now always called (interactive or not) by .cshrc script. # # Revision 1.6 88/10/06 17:09:27 stluka # Added subs alias to list subdirectories of current directory. # # Revision 1.5 88/10/06 13:46:04 stluka # Added lines to print out date/time, and current directory at shell creation. # # Revision 1.4 88/10/06 13:36:39 stluka # Removed time from prompt. # Added "./" and "../" to ac (across) and dn (down) aliases to prevent use # of cdpath. # Added "dirs" consistently to all change directory aliases. # # Revision 1.3 88/10/06 08:19:05 stluka # Added aliases pd and pop for pushd and popd. # # Revision 1.2 88/10/04 22:29:20 stluka # Added -e option of fgrep to search alias to faciliate searches for strings # starting with "-". # # Revision 1.1 88/10/04 22:26:28 stluka # Initial revision # # ----------------------------------------------------------------------------- set hostname = `hostname -f` setenv TRIDENT trident.bristle.com setenv TRIDENT_PRIVATE trident.bristle.com setenv BND 199.7.212.168 setenv KNOWLEDGESERV_PRIVATE verb.knowledgeserv.com setenv HEWITT123_PRIVATE medulla.hewitt123.com setenv SERVER1 "skip_this_host" #setenv SERVER1 ec2-184-73-124-5.compute-1.amazonaws.com setenv SERVER1_PRIVATE ip-10-251-74-21 setenv AMAZON1 "skip_this_host" #setenv AMAZON1 amazon1.bristle.com setenv AMAZON1_PRIVATE amazon1.bristle.com #setenv AMAZON1_PRIVATE domU-12-31-39-02-81-BC setenv HHL helphopelive.org setenv HHL_WEBPROD1 webprod1.helphopelive.org setenv HHL_WEBPROD1 "skip_this_host" #setenv HHL_WEBPROD1 ec2-54-235-253-33.compute-1.amazonaws.com setenv HHL_WEBPROD1_PRIVATE webprod1.helphopelive.org setenv HHL_M m.helphopelive.org setenv HHL_WEBTEST1 webtest1.helphopelive.org setenv HHL_WEBTEST1 "skip_this_host" #setenv HHL_WEBTEST1 ec2-107-21-244-63.compute-1.amazonaws.com setenv HHL_WEBTEST1_PRIVATE webtest1.helphopelive.org setenv HHL_WEBTEST2 "skip_this_host" #setenv HHL_WEBTEST2 webtest2.helphopelive.org setenv HHL_WEBTEST3 "skip_this_host" #setenv HHL_WEBTEST3 webtest3.helphopelive.org setenv ZENBANX_WEBPROD1 "skip_this_host" #setenv ZENBANX_WEBPROD1 webprod1.zenbanx.com setenv ZENBANX_WEBPROD1_PRIVATE webprod1.zenbanx.com setenv BOONCARD_PROD1 "skip_this_host" #setenv BOONCARD_PROD1 booncard.com #setenv BOONCARD_PROD1 ec2-184-73-96-250.compute-1.amazonaws.com setenv BOONCARD_PROD1_PRIVATE prod1.booncard.com setenv BOONCARD_TEST1 "skip_this_host" #setenv BOONCARD_TEST1 test.booncard.com #setenv BOONCARD_TEST1 ec2-184-73-96-250.compute-1.amazonaws.com setenv BOONCARD_TEST1_PRIVATE test1.booncard.com setenv WALLETRON_APPPROD1 "skip_this_host" #setenv WALLETRON_APPPROD1 appprod1.walletron.com #setenv WALLETRON_APPPROD1 ec2-184-73-96-250.compute-1.amazonaws.com setenv WALLETRON_APPPROD1_PRIVATE appprod1.walletron.com setenv WALLETRON_APPQA1 "skip_this_host" #setenv WALLETRON_APPQA1 appqa1.walletron.com setenv WALLETRON_APPQA1_PRIVATE appqa1.walletron.com setenv WALLETRON_APPQA2 "skip_this_host" #setenv WALLETRON_APPQA2 appqa2.walletron.com setenv WALLETRON_APPQA2_PRIVATE appqa2.walletron.com setenv CLSI_WWW1 "skip_this_host" #setenv CLSI_WWW1 www1.clsi.org #setenv CLSI_WWW1 ec2-107-21-215-68.compute-1.amazonaws.com setenv CLSI_WWW1_PRIVATE www1.clsi.org setenv TARGETINFO_WEBPROD1 "skip_this_host" #setenv TARGETINFO_WEBPROD1 webprod1.tgtai.net #setenv TARGETINFO_WEBPROD1 ec2-23-21-50-16.compute-1.amazonaws.com setenv TARGETINFO_WEBPROD1_PRIVATE webprod1.tgtai.net setenv BALANCED_CLOUD1 "skip_this_host" #setenv BALANCED_CLOUD1 cloud1.balancedcomputing.com #setenv BALANCED_CLOUD1 ec2-107-21-251-61.compute-1.amazonaws.com setenv BALANCED_CLOUD1_PRIVATE cloud1.balancedcomputing.com #setenv BALANCED_CLOUD1_PRIVATE ip-10-125-6-32 setenv VISIBIZ_ADMIN1 "skip_this_host" #setenv VISIBIZ_ADMIN1 admin1.visibiz.com #setenv VISIBIZ_ADMIN1 ec2-184-73-178-99.compute-1.amazonaws.com setenv VISIBIZ_ADMIN1_PRIVATE admin1.visibiz.com setenv VISIBIZ_ADMIN2 "skip_this_host" #setenv VISIBIZ_ADMIN2 admin2.visibiz.com setenv VISIBIZ_ADMIN2_PRIVATE admin2.visibiz.com setenv VISIBIZ_PROD1 "skip_this_host" #setenv VISIBIZ_PROD1 prod1.visibiz.com #setenv VISIBIZ_PROD1 ec2-184-72-220-222.compute-1.amazonaws.com setenv VISIBIZ_PROD1_PRIVATE prodapp1.visibiz.com #setenv VISIBIZ_PROD1_PRIVATE domU-12-31-39-06-29-F2 setenv VISIBIZ_PROD2 "skip_this_host" #setenv VISIBIZ_PROD2 prod2.visibiz.com #setenv VISIBIZ_PROD2 ec2-184-72-159-145.compute-1.amazonaws.com setenv VISIBIZ_PROD2_PRIVATE prodapp2.visibiz.com #setenv VISIBIZ_PROD2_PRIVATE domU-12-31-39-00-D0-A1 setenv tomom /Users/fred/fred/Dropbox/FredAndMom/ToMom setenv frommom /Users/fred/fred/Dropbox/FredAndMom/ToFred setenv tohans /Users/fred/fred/Dropbox/HHL/ToHans setenv fromhans /Users/fred/fred/Dropbox/HHL/ToFred setenv tokim /Users/fred/fred/Dropbox/HHL/ToKim setenv fromkim /Users/fred/fred/Dropbox/HHL/ToFred setenv tojanice /Users/fred/fred/Dropbox/HHL/ToJanice setenv fromjanice /Users/fred/fred/Dropbox/HHL/ToFred setenv toalan /Users/fred/fred/Dropbox/HHL/ToAlan setenv fromalan /Users/fred/fred/Dropbox/HHL/ToFred setenv tojim /Users/fred/fred/Dropbox/HHL/ToJim setenv fromjim /Users/fred/fred/Dropbox/HHL/ToFred setenv tobill /Users/fred/fred/Dropbox/HHL/ToBill setenv frombill /Users/fred/fred/Dropbox/HHL/ToFred setenv toreagan /Users/fred/fred/GoogleDrive/FredAndReagan/ToReagan setenv fromreagan /Users/fred/fred/GoogleDrive/FredAndReagan/ToFred setenv tobrita /Users/fred/fred/Dropbox/FredAndBrita/ToBrita setenv frombrita /Users/fred/fred/Dropbox/FredAndBrita/ToFred setenv tonothafts /Users/fred/fred/Dropbox/FredAndNothafts/ToNothafts setenv fromnothafts /Users/fred/fred/Dropbox/FredAndNothafts/ToFred setenv fromcamera /Users/fred/fred/Dropbox/Camera/ # trailing slash for link setenv topackt /Users/fred/fred/Dropbox/FredAndPackt/ToPackt setenv frompackt /Users/fred/fred/Dropbox/FredAndPackt/ToFred setenv tomike /Users/fred/fred/Dropbox/FredAndMike/ToMike setenv frommike /Users/fred/fred/Dropbox/FredAndMike/ToFred setenv togina /Users/fred/fred/Dropbox/FredAndGina/ToGina setenv fromgina /Users/fred/fred/Dropbox/FredAndGina/ToFred setenv tokathyisgrig /Users/fred/fred/Dropbox/FredStlukaAndKathyIsgrig/ToKathy setenv fromkathyisgrig /Users/fred/fred/Dropbox/FredStlukaAndKathyIsgrig/ToFred setenv toml /Users/fred/fred/Dropbox/FredAndML/ToML setenv fromml /Users/fred/fred/Dropbox/FredAndML/ToFred setenv tojeff /Users/fred/fred/Dropbox/FredAndJeff/ToJeff setenv fromjeff /Users/fred/fred/Dropbox/FredAndJeff/ToFred setenv tofrank /Users/fred/fred/Dropbox/FredAndFrank/ToFrank setenv fromfrank /Users/fred/fred/Dropbox/FredAndFrank/ToFred setenv todpp /Users/fred/fred/Dropbox/FredAndDiplomacy/ToDiplomacy setenv fromdpp /Users/fred/fred/Dropbox/FredAndDiplomacy/ToFred setenv toewald /Users/fred/fred/Dropbox/FredAndEwald/ToEwald setenv fromewald /Users/fred/fred/Dropbox/FredAndEwald/ToFred setenv tofrance /Users/fred/fred/Dropbox/FredStlukaAndBobFrance/ToFrance setenv fromfrance /Users/fred/fred/Dropbox/FredStlukaAndBobFrance/ToFred setenv togadrow /Users/fred/fred/Dropbox/FredAndJim/ToJim setenv fromgadrow /Users/fred/fred/Dropbox/FredAndJim/ToFred # ----------------- # Tomcat Web server # ----------------- # I use symbolic links to keep this the same on all hosts: setenv CATALINA_HOME /usr/local/tomcat if ("$hostname" == "$VISIBIZ_ADMIN1_PRIVATE") then setenv CATALINA5_HOME /usr/local/tomcat setenv CATALINA6_HOME /usr/local/tomcat6 endif # ------ # Grails # ------ # I use symbolic links to keep this the same on all hosts: setenv GRAILS_HOME /usr/local/grails # ----- # Maven # ----- # I use symbolic links to keep this the same on all hosts: setenv M2_HOME /usr/local/maven setenv M2 $M2_HOME/bin # --- # GWT # --- # I use symbolic links to keep this the same on all hosts: setenv GWT_HOME /usr/local/gwt # ------- # MongoDB # ------- set mongo_name = "mongodb" # --------- # GlassFish # --------- set glassfish_home = "~/glassfish3/glassfish" if ("$hostname" == "$BOONCARD_PROD1_PRIVATE") then set glassfish_home = "/usr/share/glassfish3/glassfish/" else if ("$hostname" == "$BOONCARD_TEST1_PRIVATE") then set glassfish_home = "/usr/share/glassfish3/glassfish/" else if ("$hostname" == "$WALLETRON_APPPROD1_PRIVATE") then set glassfish_home = "/usr/share/glassfish3/glassfish/" endif set domain1_home = "$glassfish_home/domains/domain1" # ------------------------------------------------------------ # SqSh (for command line access to MS SQL Server from trident) # ?? Is this needed at sqsh runtime? Or only during the build? # ?? 6/7/2013 # ?? SqSh seems to work fine w/o it. I think it is not needed # ?? at runtime. Can probably delete it here. # ------------------------------------------------------------ if ("$hostname" == "$TRIDENT_PRIVATE") then setenv SYBASE /usr/local else if ("$hostname" == "$AMAZON1_PRIVATE") then setenv SYBASE /usr else if ("$hostname" == "$HHL_WEBPROD1_PRIVATE") then setenv SYBASE /usr else if ("$hostname" == "$ZENBANX_WEBPROD1_PRIVATE") then setenv SYBASE /usr endif # ----------------------------------------------------------------------------- # Set PYTHONPATH, so Django manage.py inspectdb can find MS SQL driver # ----------------------------------------------------------------------------- if ("`printenv OSTYPE`" == "linux") then #?? No. It interferes w/yum which uses an older version of Python. #?? Have to use --pythonpath option of inspectdb instead #?? setenv PYTHONPATH /var/python27/virtualenvs/hhl/lib/python2.7/site-packages/django/db/backends else if ("`printenv OSTYPE`" == "darwin") then # No. For some reason, it prevents Python from being able to do: # >>> from sqlite3 import dbapi2 # setenv PYTHONPATH ~/python/virtualenvs/hhl/lib/python2.7/site-packages/django/db/backends # Instead, I created a symlink that is another way to get inspectdb to work: # ln -s django/db/backends/sql_server \ # ~/python/virtualenvs/hhl/lib/python2.7/site-packages/sql_server endif # ----------------------------------------------------------------------------- # Set HHL_ENVIRONMENT, so Django treats this as a HHL DEV machine. # ----------------------------------------------------------------------------- if ("$hostname" == "$TRIDENT_PRIVATE") then # Do NOT set HHL_ENVIRONMENT here. Trident is used as the HHL TEST # environment, so it is already set system-wide to "test". else if ("$hostname" == "$HHL_WEBPROD1_PRIVATE") then # Do NOT set HHL_ENVIRONMENT here. This is the HHL PROD # environment, so it is already set system-wide to "prod". else if ("`printenv OSTYPE`" == "linux") then # Do NOT set HHL_ENVIRONMENT here. As we spin up other HHL Linux # servers, they will have system-wide settings. else if ("`printenv OSTYPE`" == "darwin") then setenv HHL_ENVIRONMENT fred_dev endif setenv IPBLOCKALL_LIST ~/fred/ipblockall.lis alias psl '\ps -ww \!* -o user,tty,start,pid,ppid,pgid,%cpu,time,%mem,rss,pri,nice=NICE,jobc=JOBS,sess,state=STATE,flags=FLAGS,command' # Show customized info about each process. # Note: Define it outside of "if ($?prompt)" test to make it available # to psgrep script. # Note: Need \ps, not just ps, to avoid alias loop since ps calls psl # -w = Limit width to 132 instead of current screen width # -ww = Unlimited screen width (Or could pipe through cat) # -o keywords available on macOS: # - Listed in man page: # %cpu percentage CPU usage (alias pcpu) # - For past 60 secs # %mem percentage memory usage (alias pmem) # - Real physical memory, not virtual memory # acflag accounting flag (alias acflg) # args command and arguments # comm command # command command and arguments # cpu short-term CPU usage factor (for scheduling) # etime elapsed running time # flags the process flags, in hexadecimal (alias f) # gid processes group id (alias group) # inblk total blocks read (alias inblock) # jobc job control count # ktrace tracing flags # ktracep tracing vnode # lim memoryuse limit # logname login name of user who started the session # lstart time started # - Longer version of start # majflt total page faults # minflt total page reclaims # msgrcv total messages received (reads from pipes/sockets) # msgsnd total messages sent (writes on pipes/sockets) # nice nice value (alias ni) # - Scheduling priority # nivcsw total involuntary context switches # nsigs total signals taken (alias nsignals) # nswap total swaps in/out # nvcsw total voluntary context switches # nwchan wait channel (as an address) # oublk total blocks written (alias oublock) # p_ru resource usage (valid only for zombie) # paddr swap address # pagein pageins (same as majflt) # pgid process group number # pid process ID # ppid parent process ID # pri scheduling priority # re core residency time (in seconds; 127 = infinity) # rgid real group ID # rss resident set size # - Real memory (kB) # ruid real user ID # ruser user name (from ruid) # sess session ID # sig pending signals (alias pending) # sigmask blocked signals (alias blocked) # sl sleep time (in seconds; 127 = infinity) # start time started # state symbolic process state (alias stat) # svgid saved gid from a setgid executable # svuid saved UID from a setuid executable # tdev control terminal device number # time accumulated CPU time, user + system (alias cputime) # tpgid control terminal process group ID # tsess control terminal session ID # tsiz text size (in Kbytes) # tt control terminal name (two letter abbreviation) # - Shorter version of tty # tty full name of control terminal # ucomm name to be used for accounting # uid effective user ID # upr scheduling priority on return from system call # (alias usrpri) # user user name (from UID) # utime user CPU time (alias putime) # - time = stime + utime # vsz virtual size in Kbytes (alias vsize) # wchan wait channel (as a symbolic name) # - Event/address being waited for # wq total number of workqueue threads # wqb number of blocked workqueue threads # wqr number of running workqueue threads # wql workqueue limit status (C = constrained thread limit, # T = total thread limit) # xstat exit or stop status (valid only for stopped or zombie # process) # - Aliases mentioned in the list above: # acflg # blocked # cputime # f # group # inblock # ni # nsignals # oublock # pcpu # pending # pmem # putime # stat # usrpri # vsize # - Not mentioned in man page, but listed by ps -L command: # caught # ignored # login # pstime # rgroup # stime System CPU time (time = stime + utime) # ----------------------------------------------------------------------------- # The following stuff is defined for interactive shells only. This means that # it is not available to shells created implicitly by scripts. # ----------------------------------------------------------------------------- if ($?prompt) then echo "Running .cshrc..." # Note: Do this output only for # interactive shells. Otherwise # it interferes with things like # scp from other computers. set history = ( 100000 '%h\t%d %W/%D/%Y %p\t%R\n' ) # Save last 100,000 commands, format # the output of the history command to # show not default (%h\t%T\t%R\n'): # - %h = Sequential commmand number # - %T = Time in 24-hour format # - %R = Command # but: # - %h = Sequential commmand number # - %d = Weekday as 'Fri' # - %W/%D/%Y = Date as 12/21/2018 # - %p = Precise (including seconds) # 12-hour time as 1:10:46pm # - %R = Command # set history = 1000 # Save last 1000 commands # set savehist = 1000 # Save commands till next session unset savehist # Have to explicitly unset it, in case # a system-wide startup file sets it. unset histdup # Don't discard duplicates from history # Have to explicitly unset it, in case # a system-wide startup file sets it, as # was happening with Amazon AWS Fedora # Core 8 Linux instances. set notify # Notify immediately when background # job completes. set filec # File name completion via ESC key # (TAB key in tcsh). set autolist # (TCSH) Show all possible completions # when TAB hit and prefix not unique. set complete = enhance # Ignore case and other minor diffs # like hyphens vs underscores when # doing file name completion. set matchbeep = nomatch # Beep only when completion finds no # match, instead of "ambiguous" (when # there are multiple matches), "never", # or "notunique" (when there is one # exact match and other longer matches) # set nobeep # Never beep (especially useful to # # suppress beeps when backspace at # # start of command line so nothing # # is there to be deleted). # # Does not suppress beeps from # # explicit use of Ctrl-G. set printexitvalue = "true" # Show any non-zero statuses that occur. # Note: Set it to a value ("true), # instead of just setting it, # so we can test that value # in .login. mesg y # Allow messages from other users. set time = (1 "Elapsed time: %E CPU seconds: %U/%S") # Report time consumed by all commands which take over 1 CPU second. # 2nd part (undocumented) is like a printf control string. # Default is: # "%Uu %Ss %E %P %X+%Dk %I+%Oio %Fpf+%Ww" # where: # %U = user cpu time # %S = system cpu time # %E = elapsed (wall clock) time # %P = percentage utilization (cpu_time/elapsed_time) # %X = text_size/cpu_second (ru_ixrss/cpu_time) # %D = data_size/cpu_second ((ru_idrss+ru_isrss)/cpu_time) # %K = image_size/cpu_second ((ru_ixrss+ru_idrss+ru_isrss)/cpu_time) # %M = maximum image size (ru_maxrss/2 -- I don't know why /2) # %I = number of input blocks (ru_inblock) # %O = number of output blocks (ru_oublock) # %F = number of hard page faults (ru_majflt) # %R = number of page reclaims (ru_minflt) # %W = number of swap-outs (ru_nswap) set watch = ( 1 any any ) # Report logins/logouts of all users, # checking every 1 minute (tcsh only). # (Doesn't work except for self unless # you are privileged enough). # set implicitcd # Treat dir name as a cd command to # #that dirname # Note: Put ~/fred/Mozilla/TBird/Profile before ~/fred so Mail folder # gets found there first. # Note: Put ~/fred/Mozilla before ~/fred/HHL so TBird folder gets found # there first. Especially by the command: # % keys TBird # Note: cdpath is still hardwired to always use . first. Bummer! # Should be required to explicitly add "." like with with PATH. set cdpath = (~/fred/Mozilla/TBird/Profile \ ~/fred/Mozilla/TBird \ ~/fred/Mozilla \ .. \ ~/fred \ ~ \ ../.. \ ../../.. \ ~/fred/website/bristle \ ~/fred/admin ~/fred/family \ ~/fred/HHL ~/fred/HHL/HHLWeb ~/fred/HHL/HHLWeb/mobile \ ~/fred/BoonCard \ ~/fred/InfrTrac ~/fred/InfrTrac/ITF \ ~/fred/Visibiz \ ~/fred/Balanced \ ~/fred/bristle ~/fred/bristle/javaapps \ ~/fred/bristle/webapps ~/fred/bristle/androidapps \ ~/fred/admin/Finance \ ~/fred/website \ ~/fred/website/bristle/Talks \ /usr/local \ /usr/local/tomcat/webapps \ /usr/local/tomcat6/webapps \ ~/fred/unix \ ~/fred/unix/HHL \ ~/fred/unix/Visibiz \ ~/fred/family/mom \ ~/fred/pingpong \ ~/fred2 \ ~/fred3 \ ~/fred4 \ ~/fred5 \ ~/fred6 \ ~/fred7 \ ~/fred8 \ ~/fred4/sb \ ~/fred9 \ ~/Pictures/Pictures \ ~/Pictures/Pictures/2019_GlacierRoadTrip \ ~/Pictures/Pictures/JerryRoadTrip \ ) set listjobs = long # List all jobs when suspending one # -------------------------------------------------------------------------- # These aliases hide or change the operation of regular commands and so # should not be in effect when scripts are run, since the script writer may # not have anticipated this. # -------------------------------------------------------------------------- alias cp cp -i -v # -i = Prompt before overwriting # -v = Verbose alias mv mv -i -v # -i = Prompt before overwriting # -v = Verbose alias rm rm -i -v # -i = Prompt before removing # -v = Verbose alias ln ln -i -v # -i = Prompt before replacing another # symlink, rather than refusing # -v = Verbose #?? Good idea? alias grep grep -i alias grep grep --color # Highlight matches in color (see # GREP_COLORS environment variable) # alias diff diff -l -s # Long format, list files which are same # # NO. Long format contains FF which is # # too tedious. alias diff diff -s # List files which are same # alias more more -c # Re-paint screen, don't scroll, for # # full screen scrolls #Not needed. Used LESS environment variable instead # alias less 'less -#8' # Arrow keys move 8 columns, not # # default of 0 which means half screen. alias from 'egrep "^From |^Subject:" /usr/spool/mail/$user' # Report who new mail is from alias su 'finger;\su -m' # Show who is logged in when I su. # Preserve environment when I su. # Note: \su avoids an alias loop. # alias sudo sudo -E # Preserve environment vars during sudo # so LESS takes effect for sudo less. # No. Too global an effect. May not # be a good idea. Add LESS to env_keep # in /etc/sudoers of various servers # instead for now. Also, this would # not have taken effect in scripts. # alias ps ps -fly # Show more info about each process. # alias ps ps -w -o user,tty,stime,ppid,pid,pgid,pri,rss,vsz,time,args alias ps psl alias pstree ps --forest # ASCII-art tree of processes alias top top -d1 # Update every 1 (not 5) second. if ("`printenv OSTYPE`" == "darwin") then alias top top -o cpu # On Mac, it defaults to 1 sec, must # be told to order by CPU time used # instead of by process ID. ALso the # -d option is for a different purpose # and takes no param. endif alias which where # Shows all matches, not just first one, # and shows built-in commands as well. alias df df -h # Use suffixes GB, MB, KB, etc alias du du -h -c # Use suffixes GB, MB, KB, etc, w/grand # total alias dutop du -s # Show only top level totals, not # separate size of each subdirectory alias lists 'lists -q \!* | less' # Interactively, use less instead of # stopping at each category of lists. # -------------------------------------------------------------------------- # This command is inherently interactive. It forces non-prompting commands # to prompt for confirmation before acting on files. # -------------------------------------------------------------------------- alias confirm '(set echo;find . -name \!:2 -ok \!:1 "{}" ";")' # CONFIRM will apply the command # specified by P1 to the files specified # by P2 (wildcards allowed) in the # current directory tree, prompting for # confirmation for each. # Must enclose P2 in double quotes if # wildcards used. # set echo - causes find command to be # echoed, to remind me how to use find. # () - cause the sequence of commands # to be run in a subprocess. This is # so that the set echo status of the # current process is not affected. # -------------------------------------------------------------------------- # Loading the history buffer with useful stuff # -------------------------------------------------------------------------- #?? alias loadhist \ #?? 'set j=`cat ~/.one_liners|wc -l`;source -h ~/.one_liners; history|tail -"$j"' #?? # Loads file of one-liners into history #?? # buffer for convenient command-line #?? # recall. # -------------------------------------------------------------------------- # These commands maintain the prompt with the following features: # - History number is displayed in the prompt. # - No. Commented out. Was done via \\! # - Time at which this directory was entered is displayed. # - Now updated to show time at which most recent prompt was displayed. # Much more current than just time at which directory was entered. # - Your username (the one you logged in as) is displayed. # - Your effective username is displayed in standout mode if you have su'd to # a different username (root, tomcat, etc.) as a reminder that you may # currently have different privileges than usual. # - Machine name is displayed. # - Full name of current directory is displayed. # - Your own home directory when in the prompt is always displayed as # "~" (not /home/fred, for example). # - Other people's main directories are displayed like "~zebrom00". # - When you switch to a directory via a soft link, the link path is # displayed instead of the real path. Use pwd -P to see the real path. # On older systems pwd with no options may do so. On all systems # echo $cwd and echo $PWD just show the link names. # - Number of nested shells is indicated (in tcsh, not csh). # - Number of directories stacked by pushd/popd, if any, is displayed. # - "ERROR" is appended to prompt if previous command failed # They are needed only in interactive mode. # Note: Moving these to non-interactive section would cause C shell to # lose ability to distinguish between interactive and non-intractive # shells because the prompt would always be defined. # -------------------------------------------------------------------------- set e = "" alias newdir0 'if ($status > 0) set e="ERROR "' # Not needed. Use %~ below instead. # alias newdir1 'set noglob;set d=(`dirs`);unset noglob' # # Noglob needed to prevent ~ from being # # expanded # Use $#dirstack instead of $#d since there's no $d defined anymore. # alias newdir2 'set n="";@ m = $#d - 1;if ($m > 0) set n="$m"; unset m' alias newdir2 'set n="";@ m = $#dirstack - 1;if ($m > 0) set n="$m"; unset m' # Not needed. Use %t below instead. # alias newdir3 'set t=`date`;set t=`echo "$t[4]x" | sed "s/:..x//"`' # Hostname part not needed. Use %m below instead. # alias newdir4 'set c=`whoami`@`hostname -s`' # # Note: Beware -s on hostname on Unix variants # # like Solaris where it means "set" # # instead of "short" and tries to change # # the name of the host. # Use both whoami (user currently su'd to) and logname (original user who # logged in) instead of just %n (same as logname). Otherwise, there's no # indication that you've su'd to someone else. Since we can query both, # can compare them and only show both when they differ. alias newdir4 'set c1=`logname`;set c2=`whoami`;if ($c1 == $c2) set c2=""' alias newdir5 'set s=""' if ($?shlvl) then alias newdir5 'set s="";if ($shlvl > 0) set s="$shlvl/"' endif # Use simpler version with tcsh built-ins. Don't really need to support # plain old csh any more. If someday I do, restore the old stuff and move # this version to a .tcshrc file or something. # alias newdir6 'set prompt="\\! $t $c [$s$n] $d[1] % ";unset c t d n s' # alias newdir6 'set prompt="$t $c [$s$n] $d[1] % ";unset c t d n s' alias newdir6 'set prompt="%B%t $c1@%m [$s$n] %~ %S$c2%s%% $e%b";unset n s c1 c2; set e=""' # %B %b = Start/end bold text # %t = Current time # %m = Machine name # %~ = Current directory name # %S %s = Start/end standout text # %% = Display a percent sign (%) # alias newdir 'newdir1;newdir2;newdir3;newdir4;newdir5;newdir6' alias newdir 'newdir0;newdir2;newdir4;newdir5;newdir6' # Set prompt alias cd 'set old=$cwd:q;chdir \!*;newdir' # Remember old dir, change dir and # update prompt alias back 'set back=$old:q;cd $back:q;unset back' # Toggle back to previous dir and # update prompt # Note: tcsh supports "cd -" which # does this automatically, and # "owd" (old working directory) # shell variable like my "old" alias pushd 'pushd \!*;newdir' # Push dir and update prompt alias popd 'popd \!*;newdir' # Pop dir and update prompt alias up 'cd ..' # Move up one dir, updating prompt alias dn 'cd ./\!*' # Move down to subdir, updating prompt alias ac 'cd ../\!*' # Move across to sibling dir, updating # prompt alias pd pushd # Push dir and update prompt alias pop popd # Pop dir and update prompt # On Linux, no -P option supported or needed. Already shows real pwd, # not links. if ("`printenv OSTYPE`" == "darwin") then alias pwd pwd -P # Show real pwd, not links endif alias mkdir mkdir -p -v # Create parent dirs if needed, show # names of dirs created. alias md mkdir alias rmdir rmdir -p -v # Delete directory and all empty parent # directories (reverse of mkdir -p), # show names of dirs deleted. if ("`printenv OSTYPE`" == "darwin") then alias rmdir rmdir -p # Delete directory and all empty parent # directories (reverse of mkdir -p) # Note: No -v option exists on Mac OS X # 10.5 (Leopard) endif alias rd rmdir alias mcd 'md \!* && cd \!*' alias c pushd # Like the c.bat I created on Windows alias ct 'pushd \!* && cd ./Tips && ls -FlA' # No. Had a bug. See ~/bin/keys script for details. # alias keys 'pushd \!* && cd ./Tips && less [Kk]ey*' alias keys 'source ~/bin/keys \!*' alias tomtailcat 'tail -F $CATALINA_HOME/logs/catalina.out' alias tomlogcat 'less $CATALINA_HOME/logs/catalina.out' alias tomlogfile '\ls -t $CATALINA_HOME/logs/localhost_log*.txt | head -1' alias tomtail 'tail -F `tomlogfile`' alias tomlog 'less `tomlogfile`' alias tomlogs 'pd $CATALINA_HOME/logs;dir' alias tomtailr 'tac `tomlogfile` | more' alias tomtail1 'tomtail | grep " 1 "' alias tomtail2 'tomtail | grep " [12] "' alias tomtail3 'tomtail | grep " [123] "' alias tomtail4 'tomtail | grep " [1234] "' if ("$hostname" == "$VISIBIZ_ADMIN1_PRIVATE") then alias tom5tailcat 'tail -F $CATALINA5_HOME/logs/catalina.out' alias tom5logcat 'less $CATALINA5_HOME/logs/catalina.out' alias tom5logfile '\ls -t $CATALINA5_HOME/logs/localhost.*.log | head -1' alias tom5tail 'tail -F `tom5logfile`' alias tom5log 'less `tom5logfile`' alias tom5logs 'pd $CATALINA5_HOME/logs;dir' alias tom5tailr 'tac `tom5logfile` | more' alias tom5tail1 'tom5tail | grep " 1 "' alias tom5tail2 'tom5tail | grep " [12] "' alias tom5tail3 'tom5tail | grep " [123] "' alias tom5tail4 'tom5tail | grep " [1234] "' alias tom6tailcat 'tail -F $CATALINA6_HOME/logs/catalina.out' alias tom6logcat 'less $CATALINA6_HOME/logs/catalina.out' alias tom6logfile '\ls -t $CATALINA6_HOME/logs/localhost.*.log | head -1' alias tom6tail 'tail -F `tom6logfile`' alias tom6log 'less `tom6logfile`' alias tom6logs 'pd $CATALINA6_HOME/logs;dir' alias tom6tailr 'tac `tom6logfile` | more' alias tom6tail1 'tom6tail | grep " 1 "' alias tom6tail2 'tom6tail | grep " [12] "' alias tom6tail3 'tom6tail | grep " [123] "' alias tom6tail4 'tom6tail | grep " [1234] "' else if ("$hostname" == "$VISIBIZ_ADMIN2_PRIVATE") then set tomlogroot = "$CATALINA_HOME/logs/test.visibiz.com" alias tomtailcat1 "tail -F ${tomlogroot}/catalina.out" alias tomlogcat1 "less ${tomlogroot}/catalina.out" alias tomlogfile1 "\ls -t ${tomlogroot}/localhost.*.log | head -1" alias tomtail1 'tail -F `tomlogfile1`' alias tomlog1 'less `tomlogfile1`' alias tomlogs1 "pd ${tomlogroot};dir" alias tomtailr1 'tac `tomlogfile1` | more' alias tomtail11 'tomtail1 | grep " 1 "' alias tomtail21 'tomtail1 | grep " [12] "' alias tomtail31 'tomtail1 | grep " [123] "' alias tomtail41 'tomtail1 | grep " [1234] "' set tomlogroot = "$CATALINA_HOME/logs/test2.visibiz.com" alias tomtailcat2 "tail -F ${tomlogroot}/catalina.out" alias tomlogcat2 "less ${tomlogroot}/catalina.out" alias tomlogfile2 "\ls -t ${tomlogroot}/localhost.*.log | head -1" alias tomtail2 'tail -F `tomlogfile2`' alias tomlog2 'less `tomlogfile2`' alias tomlogs2 "pd ${tomlogroot};dir" alias tomtailr2 'tac `tomlogfile2` | more' alias tomtail12 'tomtail2 | grep " 1 "' alias tomtail22 'tomtail2 | grep " [12] "' alias tomtail32 'tomtail2 | grep " [123] "' alias tomtail42 'tomtail2 | grep " [1234] "' else if ("$hostname" == "$VISIBIZ_PROD1_PRIVATE") then set tomlogroot = "$CATALINA_HOME/logs/crm.visibiz.com" alias tomtailcatp "tail -F ${tomlogroot}/catalina.out" alias tomlogcatp "less ${tomlogroot}/catalina.out" alias tomlogfilep "\ls -t ${tomlogroot}/localhost.*.log | head -1" alias tomtailp 'tail -F `tomlogfilep`' alias tomlogp 'less `tomlogfilep`' alias tomlogsp "pd ${tomlogroot};dir" alias tomtailrp 'tac `tomlogfilep` | more' alias tomtail1p 'tomtailp | grep " 1 "' alias tomtail2p 'tomtailp | grep " [12] "' alias tomtail3p 'tomtailp | grep " [123] "' alias tomtail4p 'tomtailp | grep " [1234] "' set tomlogroot = "$CATALINA_HOME/logs/demo.visibiz.com" alias tomtailcatd "tail -F ${tomlogroot}/catalina.out" alias tomlogcatd "less ${tomlogroot}/catalina.out" alias tomlogfiled "\ls -t ${tomlogroot}/localhost.*.log | head -1" alias tomtaild 'tail -F `tomlogfiled`' alias tomlogd 'less `tomlogfiled`' alias tomlogsd "pd ${tomlogroot};dir" alias tomtailrd 'tac `tomlogfiled` | more' alias tomtail1d 'tomtaild | grep " 1 "' alias tomtail2d 'tomtaild | grep " [12] "' alias tomtail3d 'tomtaild | grep " [123] "' alias tomtail4d 'tomtaild | grep " [1234] "' else if ("`printenv OSTYPE`" == "linux") then alias tomlogfile '\ls -t $CATALINA_HOME/logs/localhost.*.log | head -1' endif alias mongotail "tail -F /var/log/${mongo_name}/${mongo_name}.log" alias mongolog "less /var/log/${mongo_name}/${mongo_name}.log" if ("$hostname" == "$VISIBIZ_ADMIN1_PRIVATE") then set vbzlogroot = /var/log/visibiz set vbzlogfile = "$vbzlogroot/vbzDebug.log" set vbzerrfile = "$vbzlogroot/vbzError.log" set vbzstackfile = "$vbzlogroot/vbzStackTrace.log" alias vbztail "tail -F $vbzlogfile" alias vbzlog "less $vbzlogfile" alias vbzerr "less $vbzerrfile" alias vbzstack "less $vbzstackfile" alias vbzlogs "pd $vbzlogroot;dir vbz*" else if ("$hostname" == "$VISIBIZ_ADMIN2_PRIVATE") then set vbzlogroot1 = /var/log/visibiz/test.visibiz.com set vbzlogfile1 = "$vbzlogroot1/vbzDebug.log" set vbzerrfile1 = "$vbzlogroot1/vbzError.log" set vbzstackfile1 = "$vbzlogroot1/vbzStackTrace.log" alias vbztail1 "tail -F $vbzlogfile1" alias vbzlog1 "less $vbzlogfile1" alias vbzerr1 "less $vbzerrfile1" alias vbzstack1 "less $vbzstackfile1" alias vbzlogs1 "pd $vbzlogroot1;dir vbz*" set vbzlogroot2 = /var/log/visibiz/test2.visibiz.com set vbzlogfile2 = "$vbzlogroot2/vbzDebug.log" set vbzerrfile2 = "$vbzlogroot2/vbzError.log" set vbzstackfile2 = "$vbzlogroot2/vbzStackTrace.log" alias vbztail2 "tail -F $vbzlogfile2" alias vbzlog2 "less $vbzlogfile2" alias vbzerr2 "less $vbzerrfile2" alias vbzstack2 "less $vbzstackfile2" alias vbzlogs2 "pd $vbzlogroot2;dir vbz*" else if ("$hostname" == "$VISIBIZ_PROD1_PRIVATE") then set vbzlogrootp = /var/log/visibiz/crm.visibiz.com set vbzlogfilep = "$vbzlogrootp/vbzDebug.log" set vbzerrfilep = "$vbzlogrootp/vbzError.log" set vbzstackfilep = "$vbzlogrootp/vbzStackTrace.log" alias vbztailp "tail -F $vbzlogfilep" alias vbzlogp "less $vbzlogfilep" alias vbzerrp "less $vbzerrfilep" alias vbzstackp "less $vbzstackfilep" alias vbzlogsp "pd $vbzlogrootp;dir vbz*" set vbzlogrootd = /var/log/visibiz/demo.visibiz.com set vbzlogfiled = "$vbzlogrootd/vbzDebug.log" set vbzerrfiled = "$vbzlogrootd/vbzError.log" set vbzstackfiled = "$vbzlogrootd/vbzStackTrace.log" alias vbztaild "tail -F $vbzlogfiled" alias vbzlogd "less $vbzlogfiled" alias vbzerrd "less $vbzerrfiled" alias vbzstackd "less $vbzstackfiled" alias vbzlogsd "pd $vbzlogrootd;dir vbz*" else if ("$hostname" == "$VISIBIZ_PROD2_PRIVATE") then set vbzlogfile = /usr/local/tomcat/vbz-grails.log alias vbztail "tail -F $vbzlogfile" alias vbzlog "less $vbzlogfile" alias vbzlogs "pd $vbzlogfile:h;dir $vbzlogfile*" else if ("`printenv OSTYPE`" == "darwin") then set vbzlogfile = ~/fred/Visibiz/vbz2/vbz-grails.log alias vbztail "tail -F $vbzlogfile" alias vbzlog "less $vbzlogfile" alias vbzlogs "pd $vbzlogfile:h;dir $vbzlogfile*" endif alias glassdomain1tail "tail -F ${domain1_home}/logs/server.log" alias glassdomain1log "less ${domain1_home}/logs/server.log" alias glassdomain1logs "pd ${domain1_home}/logs;dir" alias activate_hhl "source /var/python27/virtualenvs/hhl/bin/activate.csh" if ("$hostname" == "$TRIDENT_PRIVATE") then alias activate_hhl "source ~/python/virtualenvs/hhl/bin/activate.csh" else if ("`printenv OSTYPE`" == "darwin") then alias activate_hhl "source ~/python/virtualenvs/hhl/bin/activate.csh" endif alias activate_dsf "source /var/python27/virtualenvs3/dsf/bin/activate.csh" if ("$hostname" == "$TRIDENT_PRIVATE") then alias activate_dsf "source ~/python/virtualenvs3/dsf/bin/activate.csh" else if ("`printenv OSTYPE`" == "darwin") then alias activate_dsf "source ~/python/virtualenvs3/dsf/bin/activate.csh" endif # -------------------------------------------------------------------------- # Machine specific stuff # -------------------------------------------------------------------------- if ("`printenv OSTYPE`" == "linux") then alias logs 'source ~/fred/bin/logs' alias messlogs 'source ~/fred/bin/messlogs' alias messcheck 'grep -E open\|LOGIN /var/log/messages* | grep -v -E fred\|REFUSED\|FAILED | more' alias maillogs 'source ~/fred/bin/maillogs' alias seclogs 'source ~/fred/bin/seclogs' alias bootlogs 'source ~/fred/bin/bootlogs' alias cronlogs 'source ~/fred/bin/cronlogs' alias ftplogs 'source ~/fred/bin/ftplogs' alias acclogs 'source ~/fred/bin/acclogs' alias errlogs 'source ~/fred/bin/errlogs' # Changed to use infratrac, not names of people. # alias doclog 'tac /var/log/httpd/access_log* | grep -E sharon\|aaron\|dave\|jim\|steve\|\ fred\|ranjeet\|ben\|stuart\|vivek\|achu\|jon | less +/"sharon|aaron|dave|jim|steve| fred|ranjeet|ben|stuart|vivek|achu|jon|2007:"' alias doclog 'tac /var/log/httpd/access_log* | grep infratrac | less +/"sharon|aaron|dave|jim|steve| fred|ranjeet|ben|stuart|vivek|achu|jon|2007:"' # Doesn't work with less. Doesn't show new data from tail -F. # alias doctail 'tail -F /var/log/httpd/access_log | grep -E sharon\|aaron\|dave\|jim\|steve\|\ fred\|ranjeet\|ben\|stuart\|vivek\|achu\|jon | less +/"sharon|aaron|dave|jim|steve| fred|ranjeet|ben|stuart|vivek|achu|jon|2007:"' # alias doctail 'tail -F /var/log/httpd/access_log | grep -E sharon\|aaron\|dave\|jim\|steve\|\ fred\|ranjeet\|ben\|stuart\|vivek\|achu\|jon | less' # Doesn't work with more. Waits too long to show new data, buffering. # alias doctail 'tail -F /var/log/httpd/access_log | grep -E sharon\|aaron\|dave\|jim\|steve\|\ fred\|ranjeet\|ben\|stuart\|vivek\|achu\|jon | more' # Changed to use infratrac, not names of people. # alias doctail 'tail -F /var/log/httpd/access_log | grep -E sharon\|aaron\|dave\|jim\|steve\|\ fred\|ranjeet\|ben\|stuart\|vivek\|achu\|jon' alias doctail 'tail -F /var/log/httpd/access_log | grep infratrac' #?? Write itflog and itftail to watch for activity at ITF site. #?? Improve on bin/itflog, adding "less" highlighting and tail following. else if ("`printenv OSTYPE`" == "darwin") then alias messtail 'tail -F /var/log/system.log' alias messlog 'less /var/log/system.log' alias messlogs 'pd /var/log;dir system.log*' alias messcheck 'bzgrep -E open\|LOGIN /var/log/system.log* | grep -v -E fred\|REFUSED\|FAILED | more' alias fwtail 'tail -F /var/log/appfirewall.log' alias fwlog 'less /var/log/appfirewall.log' alias fwlogs 'pd /var/log;dir appfirewall.log*' # Same stuff as /var/log/system.log*, but in a different # format. Perhaps better for searching and filtering by fields # via syslog. See man syslog. alias asltail 'syslog -w' alias asllog 'syslog | less' alias asllogs 'pd /var/log/asl;dir' alias cupstailacc 'tail -F /var/log/cups/access_log' alias cupslogacc 'less /var/log/cups/access_log' alias cupstailerr 'tail -F /var/log/cups/error_log' alias cupslogerr 'less /var/log/cups/error_log' alias cupstailpage 'tail -F /var/log/cups/page_log' alias cupslogpage 'less /var/log/cups/page_log' alias cupslogs 'pd /var/log/cups;dir' alias crontaildaily 'tail -F /var/log/daily.out' alias cronlogdaily 'less /var/log/daily.out' alias crontailweekly 'tail -F /var/log/weekly.out' alias cronlogweekly 'less /var/log/weekly.out' alias crontailmonthly 'tail -F /var/log/monthly.out' alias cronlogmonthly 'less /var/log/monthly.out' alias cronlogs 'pd /var/log;dir *.out' # I think this is the log location of the FTP server, if it # were running. alias ftptail 'tail -F /var/log/ftp.log' alias ftplog 'less /var/log/ftp.log' alias ftplogs 'pd /var/log;dir *ftp* *xfer*' # I think this is the log location of the Apache HTTP server, if it # were running. alias acctail 'tail -F /var/log/apache2/access_log' alias acclog 'less /var/log/apache2/access_log' alias acclogs 'pd /var/log/apache2;dir access*' # I think this is the log location of the Apache HTTP server, if it # were running. alias errtail 'tail -F /var/log/apache2/error_log' alias errlog 'less /var/log/apache2/error_log' alias errlogs 'pd /var/log/apache2;dir error*' alias viquickref 'open ~/fred/UNIX/Tips/ViQuickRef.pdf' alias hudsontail 'admin2 hudsontail' alias hudsonlog 'admin2 hudsonlog' endif endif # ----------------------------------------------------------------------------- # The following stuff is defined for all shells. # ----------------------------------------------------------------------------- # ---------------- # File protections # ---------------- umask 022 # Protect created files against write set noclobber # Don't overwrite files by piping. # ---- # sudo # ---- #alias oops 'sudo \!\!' # Intended to repeat previous command # via sudo. Doesn't work. Why? # ------------------ # Directory commands # ------------------ ##alias tree ~/com/tree.sh # Print tree-structured dir. listing ## Better version of tree found in /usr/bin/tree. Don't hide it. alias dirtree tree -dpsugDfi # Print tree structured dir listing # -d = Directories only, not files # -p = Show protections # -s = Show size # -u = Show user # -g = Show group # -D = Show modification date # -f = Show full pathname # -i = No indentation (better with -f) alias ls 'ls --full-time --color=auto' # Show full date and time, not just # one or the other, when using -l. # Also shows day of week, and seconds. # Use different colors for different # file types (dirs, links, etc.) except # when piping to another command. if ("`printenv OSTYPE`" == "darwin") then ## No. @ got to be tiresome. Too much clutter. Can use it explicitly when ## I want to, cued by the "@" at the end of the permission string like: ## -rw-r--r--@ 1 fred staff - 604K May 13 19:43:34 2021 file1.txt ## alias ls 'ls -TeG@Oh' alias ls 'ls -TeGOh' # -T = Show full date and time, not # just one or the other, when # using -l. Also shows seconds. # -e = Show ACL, if any, when using -l. # -@ = Show keys and sizes of extended # attributes, if any, when using # -l. # - xattr -l to see contents, not # just name and size # - xattr -p = print # - xattr -w # = set value # - xattr -d = remove # - xattr -c = clear (remove all) # - xattr -r = recur # - xattr -h = help (no man page) # -G = Use different colors for # different file types (dirs, # links, etc.) except when piping # to another command. # -O = Show file flags like "hidden" # which can be changed with the # Mac chflags command # -h = Use suffixes GB, MB, KB, etc endif alias lst 'echo "Modified Inode Changed Accessed Bytes Blocks Type Name"; echo "----------------------------------- ----------------------------------- ----------------------------------- ----- ------ ------------ ------------"; stat --printf="%y\t%z\t%x\t%s\t%b\t%F\t%n\n"' if ("`printenv OSTYPE`" == "darwin") then alias lst 'echo "Created Modified Inode Changed Accessed Bytes Blocks Type Name"; echo "-------------------- -------------------- -------------------- -------------------- ----- ------ ------------ ------------"; stat -f "%SB%t%Sm%t%Sc%t%Sa%t%z%t%b%t%HT%t%N"' endif alias fd ls -FlA # Directory with time/date, etc. if ("`printenv OSTYPE`" == "darwin") then alias fd ls -FlA@ # Directory with time/date, etc, and # extended attribute keys and sizes. endif # Moved to a shell script to be callable from sudo #alias dir 'pwd; ls -FlA \!*; echo -n "Total = "; ls -A \!* | wc -l' # Like VMS DIRECTORY ## OK to hide native dir. It's the same as ls. # Moved to a shell script to support call w/o params # alias dirr 'find . -name \!* -print | sort' # Recursive directory search # Better than dir -R because it doesn't # follow links. alias subs ls -Fd '`find . -maxdepth 1 -type d -o -type l | sort`' #?? Stopped working reliably on Mac 8/8/2010. Reported way too many files. #?? Why? #?? alias subs 'ls -d `echo .*/. */. | sed "s^/.^^g"`' # Display names of all subdirectories. alias subsb '/bin/ls -d `/bin/ls -Fa | grep /$`' # Display names of all subdirectories # except those which are soft links. alias subsc 'ls -l | grep "^d"' # Display details of all subdirectories, # except those starting with "." alias subsd 'ls -al | grep "^d"' # Display details of all subdirectories, # including those starting with "." alias subsr 'find . -type d -ls' # Display details of all subdirectories # recursively alias since 'find . -ctime -\!* -ls' # Recursive directory search for files # modified since specified number of days alias sincem 'find . -mtime -\!* -ls' # Same as above, but only if contents # were changed, not if only owner, # group, permissions, etc. were # changed. Useful? #Moved to a shell script to support multiple filespecs #alias except 'find * -maxdepth 0 -not -name \!:1 -ls' alias except '(set noglob; \except -i -l \!*)' # Show ls -dgils listing of all files # except those matching pattern # ----------------- # File manipulation # ----------------- alias del rm # Prompt before removing alias m more # ----------- # Information # ----------- # Replaced with my custom search script #alias search fgrep -i -n -e # Like VMS SEARCH #alias sea search alias processes ps -Nugxww # Show processes on node alias proc processes # Moved to a shell script to be callable from sloop #alias psgrep 'ps -A | head -1; ps -A | grep \!* | grep -v grep' # Search for a process #??alias cidiff ~/com/ci_diff.csh # Case insensitive file comparison #??alias diff_dir ~/com/diff_dir.csh # Case insensitive directory comparison #??alias type cat #??alias unleave ~/com/unleave.csh # Cancels alarm set by "leave" #alias bc bc ~/.bcrc # Get bc to load a startup file alias bc 'echo \!* | tr "x@" "*" | tr -d ", \044" | \bc ~/.bcrc' # Get bc to load a startup file # and to evaluate the expression on # the command line, and to accept x or # @ instead of * for multiplication # Also, strip out extra commas, spaces # and dollar signs for ease when # cutting/pasting onto the command # line from somewhere. # Had to use octal code 044 for dollar # sign. # Bug: C shell interprets $ followed by # digits as a request to expands the # specified command line arg. And # silently tolerates undefined args. # So, for example, it silently changes # $12.34 to .34. Beware wrong results. # Or, could use expr command alias dectohex 'echo \!* | tr "x@" "*" | tr -d ", \044" | \bc ~/.bcrc.tohex' alias tohex dectohex alias hex dectohex # Same as bc, but output is hex alias hextodec 'echo \!* | tr "x@" "*" | tr -d ", \044" | tr "abcdef" "ABCDEF" | \bc ~/.bcrc.fromhex' alias fromhex hextodec alias dec hextodec # Same as bc, but input is hex alias celciustofahrenheit 'bc \!*x9/5+32' alias fahrenheittocelcius 'bc \(\!* -32\)x5/9' alias ghost script # Keep a transcript of session alias h history #alias h history 50 alias jobs jobs -l #??alias la ls -a #??alias lf ls -FA #??alias ll ls -lA # ------------ # File filters # ------------ #??alias filter ~/com/filter.csh # Filter a file in place #??alias detab filter expand # Remove tabs from a file # List subdirectories of current dir. # ----------------- # Path manipulation # ----------------- #??alias editpath set path = '`csh -f ~/com/editpath.csh \!*`' # --------------- # Time management # --------------- # Note: All that use the sched command must be aliases, not shell scripts # because sched sets a timer within the current shell, but a script # creates, runs in, and kills its own shell, so the timer would be # scheduled and then abandoned. #alias beepafter 'sched +00:\!:1 beep "\!:2-$" && sched && set ignoreeof' alias beepafter 'sched +00:\!:1 beep "\!:2-$" && set ignoreeof' # Beep w/message after specified minutes # Also, echo the scheduled event list as confirmation # - No. Not necessary. Built into precmd now. # Example: beepafter 10 Ten minutes have passed #alias beepnowandevery 'beep "\!:2-$" && sched +00:\!:1 beepnowandevery \!* && sched' alias beepnowandevery 'beep "\!:2-$" && sched +00:\!:1 beepnowandevery \!*' # Beep w/message now and every specified minutes # Also, echo the scheduled event list as confirmation # - No. Not necessary. Built into precmd now. # Example: beepnowandevery 10 Ten minutes have passed again #alias beepevery 'sched +00:\!:1 beepnowandevery \!* && sched' alias beepevery 'sched +00:\!:1 beepnowandevery \!*' # Beep w/message every specified minutes # Also, echo the scheduled event list as confirmation # - No. Not necessary. Built into precmd now. # Example: beepevery 10 Ten minutes have passed again # Old version. Replaced with one that reports missing args. #alias beeper 'sched +00:\!:1 beepnowandevery \!:2-$ && sched' # Old version. Replaced with one that reports missing args even if it's # the 1st or 2nd arg that's missing. This one showed errors in those # cases, as: # % beeper # Bad ! arg selector. # % beeper 1 # Bad ! arg selector. # % beeper 1 2 # Usage: beeper initial REPEAT message #alias beeper 'if (\!:2 == \!:$) echo "Usage: \!:0 initial REPEAT message"; if (\!:2 \!= \!:$) sched +00:\!:1 beepnowandevery \!:2-$' # Doesn't work. Can't refer to history events except on line 1. So line # 2 here always reports "Bad ! arg selector." #alias beeper 'if (\!:2 == \!:$) then \ # echo "Usage: \!:0 initial REPEAT message" \ # else if (\!:2 \!= \!:$) then \ # sched +00:\!:1 beepnowandevery \!:2-$ \ # endif' # Doesn't work. The short circuit || doesn't prevent the error when less # than 3 args: "Bad ! arg selector." #alias beeper 'if (\!:0 == \!:$ || \!:1 == \!:$ || \!:2 == \!:$) echo "Usage: \!:0 initial_mins repeat_mins message_words..."; if (\!:0 != \!:$ && \!:1 != \!:$ && \!:2 != \!:$) sched +00:\!:1 beepnowandevery \!:2-$' # Doesn't work. The history substitution is still attempted too early. # Still get the error when less than 3 args: "Bad ! arg selector." #alias beeper 'if (\!:0 == \!:$) echo "Usage: \!:0 initial_mins repeat_mins message_words..."; if (\!:0 != \!:$ && \!:1 == \!:$) echo "Usage: \!:0 initial_mins repeat_mins message_words..."; if (\!:0 != \!:$ && \!:1 != \!:$ && \!:2 == \!:$) echo "Usage: \!:0 initial_mins repeat_mins message_words..."; if (\!:0 != \!:$ && \!:1 != \!:$ && \!:2 \!= \!:$) sched +00:\!:1 beepnowandevery \!:2-$' # Settle for this for now. Shows error when 0 or 1 args, usage when 2, as: # % beeper # Bad ! arg selector. # % beeper 1 # Bad ! arg selector. # % beeper 1 2 # Usage: beeper initial REPEAT message alias beeper 'if (\!:2 == \!:$) echo "Usage: \!:0 initial REPEAT message"; if (\!:2 \!= \!:$) sched +00:\!:1 beepnowandevery \!:2-$' # Beep w/message after initial minutes and every repeat minutes # Also, echo the scheduled event list as confirmation # - No. Not necessary. Built into precmd now. # Example: beeper 10 1 Another minute since the first 10 # Note: The if statement is an attempt to prevent usage errors # like omitting the repeat argument: # % beeper 20 "Twenty minutes have passed" # which should have been # % beeper 20 1 "Twenty minutes have passed" # Unfortunately, it only works when the message is # quoted or a single word. Really should rewrite it # to confirm that 2nd arg is entirely numeric. #?? Can't set it for longer than 59 minutes #?? - Workaround: #?? % sleep `bc 60x60` ; beeper 40 1 Laundry #?? - Or could update to take another param as count of #?? hours and plug it in to sched command like I do #?? with minutes. Maybe write a 2nd alias beeper4 that #?? takes 4 params instead of just 3? Have one call the #?? other? #alias alarm 'sched \!:1 beepnowandevery 1 "\!:2-$" && sched' alias alarm 'sched \!:1 beepnowandevery 1 "\!:2-$"' # Beep w/message at specified time and every minute therafter # Also, echo the scheduled event list as confirmation # - No. Not necessary. Built into precmd now. # Example: alarm 11:15 Time is now 11:15 #alias precmd sched # Show list of scheduled tasks before each prompt as a reminder # to not kill a shell where I have stuff scheduled. alias precmd 'newdir; sched; if ("`sched`" != "") set ignoreeof; if ("`sched`" == "") unset ignoreeof' # Prevent Ctrl-D from killing a shell in which there are # scheduled tasks. # Also show list of scheduled tasks before each prompt as a # reminder to not run a long-running command that will prevent # the alarms from going off until it ends. # Note: precmd is a csh "special alias" that runs just before # each command line prompt is printed. I'm using it here # as a way to check often whether this shell has any # scheduled tasks. # ---- # JIRA # ---- alias j jira alias jita jira # Frequent typo alias jiar jira # Frequent typo # --- # Git # --- setenv merged_from_cf_replacement merged_from_cf_replacement # Allows command line completion as an # env var by typing $merg alias got git # Frequent typo alias gitls git ls-files # List files in Git # Example: gitls foo.c # Example: gitls *.c # (May need gitls \*.c to avoid # shell globbing?) # Made into a script to use from other scripts: # alias gitpulldryrun git fetch --dry-run -v # Use fetch. There's no pull --dry-run alias gitfetchdryrun git fetch --dry-run -v # Show if there's anything to pull alias gitdiffremote git diff master origin/master # Show details of what would be pulled # Doesn't work. Why not? alias gitsync ./gitsync alias gits git status alias gitunstage git reset HEAD # Unstage w/o changing working copy alias gitdiff git diff HEAD # Staged and unstaged diffs alias gitdiffmaster git diff master.. # Diffs from master branch alias gitdifffilenames git diff --name-only # Names of files with diffs alias gitaddinteractive git add -i # Git shell for status, diff, add, etc. alias gitaddpatch git add -p # Stage portion of a file to be committed alias gitwhatfileschanged git whatchanged # Show all files in a commit alias gitlogshowchanges git log -p alias gitwhatlineschanged git log -p # Show diffs of files in commit log alias gitlog git log --graph alias gitlogsincereverse 'git log --since=\!:1 --reverse -- \!:2' # p1 = When in log to start # Example: two.weeks.ago # p2 = File to show log for alias gitblameperline git blame alias gitshow git show # Example: gitshow SomeBranch:foo.c alias gitlogstatsummary git log --stat --summary alias gitlogoneline git log --oneline # One line per commit alias gitloggroupbyperson git shortlog # Commits grouped by committer # Example: gitloggroupbyperson -s -n alias gitlogofperson 'git log --author=\!:1' alias gitlogbeforeafter 'git log --before=\!:1 --after=\!:2' alias gitloglinerange 'git log -L \!:1,\!:2' # Example: gitloglinerange 1 5 foo.c alias gitlogmethodchanged 'git log -L:\!:1:\!:2' # Example: gitlogmethodchanged bar foo.c alias gitgui git gui alias gitk gitk alias gitx gitx alias gitcheckout git checkout # Example: gitcheckout SomeBranch foo.c # Example: gitcheckout SomeHash foo.c alias gitcommit git commit -v # Show diffs in editor for Git comments alias gitcommitamend git commit --amend alias gitgrep git grep -i --heading --line-number alias gitcherrypick git cherry-pick --signoff -x # Get files from a specified old commit # and create a new commit on the current # branch # --signoff = Add my name to the commit # comment # -x = Add "(cherry picked from # commit ...)" to the commit # comment alias gitcherrypicknonewcommit git cherry-pick --no-commit # Get files from a specified old commit # but do not create a new commit alias gitstashlist git stash list alias gitstash git stash alias gitstashapply git stash apply alias gitstashapplystage git stash apply --index alias gitstashdrop git stash drop alias gitstashpush git stash alias gitstashpop git stash pop alias gitstashdiff git stash show -p alias gitstashpoptobranch git stash branch alias gitdifffast git diff --no-ext-diff # (Bypass external diff tool) alias gitremote git remote -v # Show full URLS also alias gitbranch 'git status -b --porcelain | head -1 | cut -c 4-' # Show current branch alias gitb gitbranch alias gitbranches git branch -a -v # Show all branches alias gitbranchswitch git checkout alias gitbranchcreate git branch alias gitbranchcreateandswitch git checkout -b alias gitbranchdelete git branch -d alias gitbranchmerge 'git checkout master; git merge' alias gitbranchpush git push origin # No. Defaults to doing the pull even w/o the --track option # alias gitbranchpull 'git checkout --track origin/\!:1' alias gitbranchpull git checkout alias gitbranchchanges git log master.. # See ~/fred/git/Tips/branchlog.txt alias gitm git checkout master alias gitcf git checkout merged_from_cf_replacement alias reviewcf 'delete_pyc_files; windiff . $PWD.cf_reviewed' alias gitmergeresolve git add alias githelp git help # Help on Git commands alias gitbisectstart git bisect start alias gitbisectbad git bisect bad alias gitbisectgood git bisect good alias gitbisectreset git bisect reset alias gitbisectrun 'git bisect start HEAD \!:1 run \!:2' # p1 = bad_hash # p2 = script to build and run # regression tests # From Tim Allen (FlipperPA) alias gitlast git log -1 HEAD # Show most recent commit alias gitoops 'git reflog && echo "To revert: git reset HEAD@{index}"' # ------ # Grails # ------ alias gra grails run-app alias gta "(set echo; \mkdir -p -v target/classes; \cp -v grails-app/conf/log4j-test.xml target/classes/log4j.xml); grails test-app" alias gtau gta :unit alias gtai gta :integration alias gtaf gta :functional # ------- # MongoDB # ------- alias mvbz mongodb visibiz # --- # HHL # --- alias hhltailp1 "echo 'hhlwebprod1 errtail'; hhlwebprod1 errtail" alias hhltailp2 "echo 'hhlwebprod1 errtail_grep ERROR:';hhlwebprod1 errtail_grep ERROR:" alias hhltailp3 "echo 'hhlwebprod1 acctail_https_grep_404';hhlwebprod1 acctail_https_grep_404" alias hhltailp4 "echo 'hhlwebprod1 acctail_https_grep_500';hhlwebprod1 acctail_https_grep_500" alias hhl_watch_http_server_countp "echo 'hhlwebprod1 watch_http_server_count';hhlwebprod1 watch_http_server_count" alias hhllogp1 "echo 'hhlwebprod1 errlog'; hhlwebprod1 errlog" alias hhllogp2 "echo 'hhlwebprod1 errlog_grep ERROR:';hhlwebprod1 errlog_grep ERROR:" alias hhllogp3 "echo 'hhlwebprod1 acclog_https_grep_404';hhlwebprod1 acclog_https_grep_404" alias hhllogp4 "echo 'hhlwebprod1 acclog_https_grep_500';hhlwebprod1 acclog_https_grep_500" alias hhltailt1 "echo 'hhlwebtest1 errtail'; hhlwebtest1 errtail" alias hhltailt2 "echo 'hhlwebtest1 errtail_grep ERROR:';hhlwebtest1 errtail_grep ERROR:" alias hhltailt3 "echo 'hhlwebtest1 acctail_https_grep_404';hhlwebtest1 acctail_https_grep_404" alias hhltailt4 "echo 'hhlwebtest1 acctail_https_grep_500';hhlwebtest1 acctail_https_grep_500" alias hhl_watch_http_server_countt1 "echo 'hhlwebtest1 watch_http_server_count';hhlwebtest1 watch_http_server_count" alias hhllogt1 "echo 'hhlwebtest1 errlog'; hhlwebtest1 errlog" alias hhllogt2 "echo 'hhlwebtest1 errlog_grep ERROR:';hhlwebtest1 errlog_grep ERROR:" alias hhllogt3 "echo 'hhlwebtest1 acclog_https_grep_404';hhlwebtest1 acclog_https_grep_404" alias hhllogt4 "echo 'hhlwebtest1 acclog_https_grep_500';hhlwebtest1 acclog_https_grep_500" alias hhltail2t1 "echo 'hhlwebtest2 errtail'; hhlwebtest2 errtail" alias hhltail2t2 "echo 'hhlwebtest2 errtail_grep ERROR:';hhlwebtest2 errtail_grep ERROR:" alias hhltail2t3 "echo 'hhlwebtest2 acctail_https_grep_404';hhlwebtest2 acctail_https_grep_404" alias hhltail2t4 "echo 'hhlwebtest2 acctail_https_grep_500';hhlwebtest2 acctail_https_grep_500" alias hhl_watch_http_server_countt2 "echo 'hhlwebtest2 watch_http_server_count';hhlwebtest2 watch_http_server_count" alias hhllog2t1 "echo 'hhlwebtest2 errlog'; hhlwebtest2 errlog" alias hhllog2t2 "echo 'hhlwebtest2 errlog_grep ERROR:';hhlwebtest2 errlog_grep ERROR:" alias hhllog2t3 "echo 'hhlwebtest2 acclog_https_grep_404';hhlwebtest2 acclog_https_grep_404" alias hhllog2t4 "echo 'hhlwebtest2 acclog_https_grep_500';hhlwebtest2 acclog_https_grep_500" # --------------------------------------------------------- # Reminders of common commands, for autocompletion from CLI # --------------------------------------------------------- alias emacsautosavesdelconfirm emacsautosaves del # ---------------- # Editors and such # ---------------- setenv EDITOR vi if ("`printenv OSTYPE`" == "darwin") then setenv EDITOR ew endif # setenv EXINIT 'set autoindent' # No, use .exrc file instead setenv PAGER less setenv LESS "-I -#8 -M -j.5 -F -R -S -W -X" # -I = Case-insensitive search # -#8 = Left/right arrow scroll by # 8 chars # -m = Show percent in prompt # -M = Show percent, name, etc, in # in prompt # -N = Show line numbers # -j.5 = Searches and other jumps put # target line in middle of # screen, not at top line # Not supported on Mac OS X # -F = Quit automatically if only one # screen of text # -R = Use ANSI color escape # sequences # -S = Chop long lines (can scroll # left/right w/arrow keys) # -W = Highlight new lines and # jumped to search results # -X = Don't restore screen to # non-less contents when exiting # Otherwise, -F can cause short # files to flash on screen too # briefly to be noticed. # Also makes less work better # with windowing environments # with scrollable command line # windows. Without this option, # if you attempt to scroll back # using the native windowing # scroll mechanism, you actually # scroll back to the commands # before the less command, not # to the previous lines of the # file. if (`hostname -s` == "mbp1") then setenv LESS "-#8 -M -F -R -S -W -X" # -j.5 Not supported on Mac OS X # before Snow Leopard endif # --- # pub # --- alias pub ./pub # Always run the local ./pub, not the one from # ~/fred/macbin, ~/fred/bin, etc. alias review ./review # Always run the local ./review, not the one from # ~/fred/macbin, ~/fred/bin, etc. alias ma 'if ( -x ./ma) ./ma \!*; if (! -x ./ma) ma \!* ' # Always run the local ./ma if it exists, else the # first on the PATH # ------------- # backup_laptop # ------------- alias backup_laptop backup_laptop fred ~/fred/Visibiz # Always run with my non-default params # Not needed, since I updated .logout to save to history.log #alias qb "history >> ~/fred/admin/history.log && quick -t && beep && quick -f && beep" #alias qbo "history >> ~/fred/admin/history.log && quick -t && beep && quick -o && beep" alias qb "quick -t && beep && quick -f && beep" alias qbo "quick -t && beep && quick -o && beep" alias qbc "quick -t && beep && quick -c && beep" # ----- # jsend # ----- setenv JSEND_NAME fred@bristle.com setenv JSEND_EDITOR ew setenv JSEND_SIGNATURE ~/fred/Voicenet/SIG setenv JSEND_LISTS_DIR ~/fred/Mozilla/TBird/Lists setenv JSEND_MESSAGE_LOG ~/fred/admin/sendmail.log # ----- # Phone # ----- #alias gv "gplus && gvoice" alias gv "gvoice" # Album/slideshow management alias roadtrippics "pushd ~/Pictures/Pictures/2019_GlacierRoadTrip/Favorites; slideshow" setenv BRISTLE_SLIDESHOW_VERSION_FILE \ ~/fred/bristle/jslib/.bristle_slideshow_version # --------------------------------------- # Copied from original .cshrc on flamingo. # --------------------------------------- #??setenv BLOCKSIZE 1k #??set path = (~/bin /bin /usr/bin /sbin /usr/sbin /usr/X11/bin /usr/contrib/bin /usr/contrib/mh/bin /usr/games /usr/local/bin) #??if ($?prompt) then #??# set ignoreeof #?? set mail = (/var/mail/$USER) #?? set mch = `hostname -s` #??# set prompt = "${mch:q}: {\!} % " #??endif #??# if ( -f ~/.cshrc.locale ) source ~/.cshrc.locale #?? # --------------------------------------- # Path settings # --------------------------------------- #echo "JAVA_HOME = $JAVA_HOME" if ("$hostname" == "neptune.bristle.com") then setenv JAVA_HOME /usr/java/j2sdk1.4.2_05 else if ("$hostname" == "$TRIDENT_PRIVATE") then setenv JAVA_HOME /usr/lib/jvm/java else if ("$hostname" == "$SERVER1_PRIVATE") then setenv JAVA_HOME /usr/lib/jvm/java else if ("$hostname" == "$AMAZON1_PRIVATE") then # Don't override the system-wide setting from /etc/profile.d/java.* # if ("`printenv JAVA_HOME`" == "") then setenv JAVA_HOME /usr/lib/jvm/java # endif else if ("$hostname" == "$HHL_WEBPROD1_PRIVATE") then # Don't override the system-wide setting from /etc/profile.d/java.* # if ("`printenv JAVA_HOME`" == "") then setenv JAVA_HOME /usr/lib/jvm/java # endif else if ("$hostname" == "$ZENBANX_WEBPROD1_PRIVATE") then # Don't override the system-wide setting from /etc/profile.d/java.* # if ("`printenv JAVA_HOME`" == "") then setenv JAVA_HOME /usr/lib/jvm/java # endif else if ("$hostname" == "$BOONCARD_PROD1_PRIVATE") then # Don't override the system-wide setting from /etc/profile.d/java.* # if ("`printenv JAVA_HOME`" == "") then setenv JAVA_HOME /usr/lib/jvm/java # endif else if ("$hostname" == "$BOONCARD_TEST1_PRIVATE") then # Don't override the system-wide setting from /etc/profile.d/java.* # if ("`printenv JAVA_HOME`" == "") then setenv JAVA_HOME /usr/lib/jvm/java # endif else if ("$hostname" == "$WALLETRON_APPPROD1_PRIVATE") then # Don't override the system-wide setting from /etc/profile.d/java.* # if ("`printenv JAVA_HOME`" == "") then setenv JAVA_HOME /usr/lib/jvm/java # endif else if ("$hostname" == "$CLSI_WWW1_PRIVATE") then # Don't override the system-wide setting from /etc/profile.d/java.* # if ("`printenv JAVA_HOME`" == "") then setenv JAVA_HOME /usr/lib/jvm/java # endif else if ("$hostname" == "$TARGETINFO_WEBPROD1_PRIVATE") then # Don't override the system-wide setting from /etc/profile.d/java.* # if ("`printenv JAVA_HOME`" == "") then setenv JAVA_HOME /usr/lib/jvm/java # endif else if ("$hostname" == "$BALANCED_CLOUD1_PRIVATE") then # Don't override the system-wide setting from /etc/profile.d/java.* # if ("`printenv JAVA_HOME`" == "") then setenv JAVA_HOME /usr/lib/jvm/java # endif else if ("$hostname" == "$VISIBIZ_ADMIN1_PRIVATE") then # Don't override the system-wide setting from /etc/profile.d/java.* if ("`printenv JAVA_HOME`" == "") then setenv JAVA_HOME /usr/lib/jvm/java endif else if ("$hostname" == "$VISIBIZ_ADMIN2_PRIVATE") then # Don't override the system-wide setting from /etc/profile.d/java.* if ("`printenv JAVA_HOME`" == "") then setenv JAVA_HOME /usr/lib/jvm/java endif else if ("$hostname" == "$VISIBIZ_PROD1_PRIVATE") then # Don't override the system-wide setting from /etc/profile.d/java.* #?? Causes error when JAVA_HOME is not defined. Why? #?? if ("`printenv JAVA_HOME`" == "") then #?? setenv JAVA_HOME /usr/lib/jvm/java #?? endif else if ("$hostname" == "$VISIBIZ_PROD2_PRIVATE") then # Don't override the system-wide setting from /etc/profile.d/java.* #?? Causes error when JAVA_HOME is not defined. Why? #?? if ("`printenv JAVA_HOME`" == "") then #?? setenv JAVA_HOME /usr/lib/jvm/java #?? endif else if ("$hostname" == "$KNOWLEDGESERV_PRIVATE") then setenv JAVA_HOME /usr/lib/jvm/java else if ("$hostname" == "$HEWITT123_PRIVATE") then setenv JAVA_HOME /usr/lib/jvm/java else if ("`printenv OSTYPE`" == "linux") then setenv JAVA_HOME /usr/lib/jvm/java else if ("`printenv OSTYPE`" == "darwin") then # setenv JAVA_HOME /System/Library/Frameworks/JavaVM.framework/Home setenv JAVA_HOME ~/Java/jdk-15.0.2.jdk/Contents/Home else if ("$hostname" == "crapola") then else setenv JAVA_HOME /System/Library/Frameworks/JavaVM.framework/Home endif set path = ($path ~/fred/DPP/bin) set path = ($path ~/fred/W4DT/bin) #set path = ($path ~/fred/HHL/bin) set path = ($path ~/fred/TargetInfo/bin) #set path = ($path ~/fred/BoonCard/bin) #set path = ($path ~/fred/Balanced/bin) # Visibiz stuff before standard grails stuff so I can hide standard # grails command with my own script that overrides JAVA_HOME. #set path = ($path ~/fred/Visibiz/bin) set path = ($path $GRAILS_HOME/bin) set path = ($M2 $path) if ("`printenv JAVA_HOME`" != "") then set path = ($JAVA_HOME/bin $path) # Specific Java before version in /usr/bin. # May not be necessary on systems that use # /etc/alternatives system, since these two # two probably end up being symlinks to the # same place. endif # All MySQL stuff done as mysql user. Not needed on my path. if ("`printenv OSTYPE`" == "darwin") then set path = ($path /usr/local/mysql/bin) endif set path = ($path /usr/local/${mongo_name}/bin) set path = (~/fred/bin $path) # Fred's stuff first if ("`printenv OSTYPE`" == "darwin") then set path = (~/fred/macbin $path) # Fred's Mac stuff first endif set path = (~/bin $path) # My stuff first, even before Fred's if ("`printenv OSTYPE`" == "darwin") then set path = (~/fred/macbin $path) # Mac stuff first, before Linux endif set path = ($path /usr/local/sbin /usr/sbin /sbin) # Stuff needed by root if ("`printenv OSTYPE`" == "darwin") then setenv EC2_HOME /usr/local/amazon/ec2-api-tools set path = ($path $EC2_HOME/bin) setenv EC2_PRIVATE_KEY ~/.ec2/pk-7PE2AMJCHBVQ3P63LFVNXOSUKYM6CMOE.pem setenv EC2_CERT ~/.ec2/cert-7PE2AMJCHBVQ3P63LFVNXOSUKYM6CMOE.pem endif if ("`printenv OSTYPE`" == "darwin") then set path = ($path ~/android/android-sdk-macosx/tools) set path = ($path ~/android/android-sdk-macosx/platform-tools) endif set path = ($path /Developer/usr/bin) # Mac OS X Developer tools -- Not # really needed since the install also # put almost all of them in /usr/bin, # but makes it easier to learn via # "which" where they came from. set path = ($path /usr/games) # Games #set path = ($path /usr/local/visibiz/scripts/bin/) #Visibiz stuff last set path = ($path ~/.gem/ruby/1.8/bin) # Ruby gems (compass, sass, hal, etc.) set path = ($path ~/glassfish3/bin) # Glassfish set path = ($path ~/glassfish3/glassfish/bin) set path = ($path ~/glassfish3/ant/bin) #set path = ($path ~/playframework/play-2.0.3) set path = ($path .) # Local directory contents last if ( -f ~/fred/bin/mysqldbpw ) setenv MYSQL_PW `cat ~/fred/bin/mysqldbpw` # ----------------------------------------------------------------------------- # The following stuff is defined for interactive shells only. This means that # it is not available to shells created implicitly by scripts. # ----------------------------------------------------------------------------- if ($?prompt) then # -------------------------------------------------------------------------- # Info to be printed out at startup of each interactive shell. # -------------------------------------------------------------------------- date # Print current Time/date newdir # Change prompt to reflect current dir. # Note: Do this after setting the PATH # because the newdir alias uses # some commands that may not be # on the path by default. if ("`printenv OSTYPE`" == "darwin") then settitle -h endif endif # Setting PATH for Python 2.7 # The orginal version is saved in .cshrc.pysave set path=(/Library/Frameworks/Python.framework/Versions/2.7/bin $path) ## # Your previous /Users/fred/.cshrc file was backed up as /Users/fred/.cshrc.macports-saved_2012-09-22_at_18:03:11 ## # MacPorts Installer addition on 2012-09-22_at_18:03:11: adding an appropriate PATH variable for use with MacPorts. setenv PATH /opt/local/bin:/opt/local/sbin:$PATH # Finished adapting your PATH environment variable for use with MacPorts. # Setting PATH for Python 3.5 # The original version is saved in .cshrc.pysave set path=(/Library/Frameworks/Python.framework/Versions/3.5/bin $path)