<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Paging Bill Hassell in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/paging-bill-hassell/m-p/3196843#M165889</link>
    <description>Pete,&lt;BR /&gt;&lt;BR /&gt;I've been using something very similar to your PS1 command ever since I came here 10 months ago. It works fine till I change directory - the prompt doesn't change with me! Any ideas how to fix this? If you have, it's worth more than a big fat zero!&lt;BR /&gt;&lt;BR /&gt;Strangely enough, exactly the same command worked the way I wanted it to on AIX systems (i.e. the prompt changed when I changed directory).&lt;BR /&gt;&lt;BR /&gt;Even if I do get the prompt working, I will still be using Bill's aliases. Every day I use the find command to locate a file (not the same file - my memory's not that bad!) via find / -name etc. I also sometimes tidy a directory of old files via find . -mtime +7 etc.&lt;BR /&gt;&lt;BR /&gt;How easy would it be to type find / when I mean to type find .? Too easy for comfort!&lt;BR /&gt;&lt;BR /&gt;Incidentally, the aliases I have set up are del for rm -i and move for mv -i - I may one day want to use rm without the -i: but only when I'm 100% certain I'm in the right directory.&lt;BR /&gt;&lt;BR /&gt;Mark</description>
    <pubDate>Mon, 23 Feb 2004 04:33:43 GMT</pubDate>
    <dc:creator>MarkSyder</dc:creator>
    <dc:date>2004-02-23T04:33:43Z</dc:date>
    <item>
      <title>Paging Bill Hassell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/paging-bill-hassell/m-p/3196836#M165882</link>
      <description>Bill,&lt;BR /&gt;&lt;BR /&gt;You advised someone yesterday to alias rm and similar commands to prevent disaster. I had nothing to offer to that poor person, and found myself thinking "There but for the grace of God go I". I have taken your advice, but as I did not make the original post cannot give you any points on it.&lt;BR /&gt;&lt;BR /&gt;Put a post on here, even if it's only a full stop, and I'll give you 10 points for helping me to prevent a future disaster!&lt;BR /&gt;&lt;BR /&gt;Mark Syder (like the drink but spelt different)</description>
      <pubDate>Thu, 19 Feb 2004 11:03:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/paging-bill-hassell/m-p/3196836#M165882</guid>
      <dc:creator>MarkSyder</dc:creator>
      <dc:date>2004-02-19T11:03:21Z</dc:date>
    </item>
    <item>
      <title>Re: Paging Bill Hassell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/paging-bill-hassell/m-p/3196837#M165883</link>
      <description>Mark,&lt;BR /&gt;&lt;BR /&gt;(Pardon me for butting in!).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I've got two tips for you:&lt;BR /&gt;&lt;BR /&gt;1)  To help avoid a situation like the one in the thread yesterday (running rm -rf when the person *thought* they were in /tmp), I put the pwd in root's prompt, like this:&lt;BR /&gt;&lt;BR /&gt; export PS1="`hostname`$PWD:`whoami`# "&lt;BR /&gt; tsws1/tmp:root#&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;2)  I doubt Bill will come to collect his bounty.  He's not in this for the points.  If he was, we would all be chasing him.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete&lt;BR /&gt;&lt;BR /&gt;(A big fat zero would be perfect, thanks)</description>
      <pubDate>Thu, 19 Feb 2004 11:21:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/paging-bill-hassell/m-p/3196837#M165883</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2004-02-19T11:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: Paging Bill Hassell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/paging-bill-hassell/m-p/3196838#M165884</link>
      <description>An adapted quote:&lt;BR /&gt; &lt;BR /&gt;"There are only two types of system administrators: those that have lost critical files and directories, and thos that are going to"&lt;BR /&gt; &lt;BR /&gt;The 'dangerous' commands and moving root's home directory are standard procedures for me when setting up new systems (and fixing old ones). I like the idea that someone checks your work before you actually type rm. Another very important tool is sudo, freely available from the Liverpool archive. With it, you can eliminate the need for giving out the root password as well as preventing users from accessing dangerous commands. You can even limit the valid parameters allowed for a command (like mount or umount).&lt;BR /&gt; &lt;BR /&gt;I'll be giving an all day sysadmin seminar at HP World this year where I'll cover these tips and a bunch more. &lt;A href="http://www.hpworld.com/conference/hpworld2004/about.html" target="_blank"&gt;http://www.hpworld.com/conference/hpworld2004/about.html&lt;/A&gt;</description>
      <pubDate>Thu, 19 Feb 2004 11:50:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/paging-bill-hassell/m-p/3196838#M165884</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2004-02-19T11:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: Paging Bill Hassell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/paging-bill-hassell/m-p/3196839#M165885</link>
      <description>Watch me closely as I do a Bill Hassell Imitation.&lt;BR /&gt;&lt;BR /&gt;No, I will not be shaving off my hair!&lt;BR /&gt;&lt;BR /&gt;alias&lt;BR /&gt;&lt;BR /&gt;I get this.&lt;BR /&gt;&lt;BR /&gt;autoload='typeset -fu'&lt;BR /&gt;command='command '&lt;BR /&gt;functions='typeset -f'&lt;BR /&gt;history='fc -l'&lt;BR /&gt;integer='typeset -i'&lt;BR /&gt;local=typeset&lt;BR /&gt;ls=/usr/bin/ls&lt;BR /&gt;nohup='nohup '&lt;BR /&gt;r='fc -e -'&lt;BR /&gt;stop='kill -STOP'&lt;BR /&gt;suspend='kill -STOP $$'&lt;BR /&gt;type='whence -v'&lt;BR /&gt;vi=/usr/bin/vi&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;alias -x rm='/usr/contrib/bin/reallyrm'&lt;BR /&gt;&lt;BR /&gt;the script in /usr/contrib/bin can have reminders prompts, warnings and explanations of doom.&lt;BR /&gt;&lt;BR /&gt;Pete's Suggestion Deserves 10 points. it can be set in the /.kshrc file&lt;BR /&gt;&lt;BR /&gt;and &lt;BR /&gt;&lt;BR /&gt;ENV=/.kshrc in /etc/profile&lt;BR /&gt;&lt;BR /&gt;SEP&lt;BR /&gt;</description>
      <pubDate>Thu, 19 Feb 2004 11:58:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/paging-bill-hassell/m-p/3196839#M165885</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2004-02-19T11:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: Paging Bill Hassell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/paging-bill-hassell/m-p/3196840#M165886</link>
      <description>I missed the original Bill while testing my alias command.&lt;BR /&gt;&lt;BR /&gt;I like the original better.&lt;BR /&gt;&lt;BR /&gt;All said was meant in good humor.&lt;BR /&gt;&lt;BR /&gt;Hi Bill.&lt;BR /&gt;&lt;BR /&gt;Good Luck,&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Thu, 19 Feb 2004 12:02:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/paging-bill-hassell/m-p/3196840#M165886</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2004-02-19T12:02:36Z</dc:date>
    </item>
    <item>
      <title>Re: Paging Bill Hassell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/paging-bill-hassell/m-p/3196841#M165887</link>
      <description>Sorry, for interfering your thread.&lt;BR /&gt;But I had to smile reading Bill's quote.&lt;BR /&gt;I think to have heard sometime this slightly modified version:&lt;BR /&gt; &lt;BR /&gt;There are two types of motorbikers.&lt;BR /&gt;Those who have fallen, and those who will fall.</description>
      <pubDate>Thu, 19 Feb 2004 12:10:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/paging-bill-hassell/m-p/3196841#M165887</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2004-02-19T12:10:37Z</dc:date>
    </item>
    <item>
      <title>Re: Paging Bill Hassell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/paging-bill-hassell/m-p/3196842#M165888</link>
      <description>Boy!  Bill just loves to prove me wrong!!&lt;BR /&gt;&lt;BR /&gt;(Lucky for him I give him so many opportunities)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete&lt;BR /&gt;&lt;BR /&gt;(0, thanks)</description>
      <pubDate>Thu, 19 Feb 2004 12:29:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/paging-bill-hassell/m-p/3196842#M165888</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2004-02-19T12:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: Paging Bill Hassell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/paging-bill-hassell/m-p/3196843#M165889</link>
      <description>Pete,&lt;BR /&gt;&lt;BR /&gt;I've been using something very similar to your PS1 command ever since I came here 10 months ago. It works fine till I change directory - the prompt doesn't change with me! Any ideas how to fix this? If you have, it's worth more than a big fat zero!&lt;BR /&gt;&lt;BR /&gt;Strangely enough, exactly the same command worked the way I wanted it to on AIX systems (i.e. the prompt changed when I changed directory).&lt;BR /&gt;&lt;BR /&gt;Even if I do get the prompt working, I will still be using Bill's aliases. Every day I use the find command to locate a file (not the same file - my memory's not that bad!) via find / -name etc. I also sometimes tidy a directory of old files via find . -mtime +7 etc.&lt;BR /&gt;&lt;BR /&gt;How easy would it be to type find / when I mean to type find .? Too easy for comfort!&lt;BR /&gt;&lt;BR /&gt;Incidentally, the aliases I have set up are del for rm -i and move for mv -i - I may one day want to use rm without the -i: but only when I'm 100% certain I'm in the right directory.&lt;BR /&gt;&lt;BR /&gt;Mark</description>
      <pubDate>Mon, 23 Feb 2004 04:33:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/paging-bill-hassell/m-p/3196843#M165889</guid>
      <dc:creator>MarkSyder</dc:creator>
      <dc:date>2004-02-23T04:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: Paging Bill Hassell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/paging-bill-hassell/m-p/3196844#M165890</link>
      <description>PS1="servername":$PWD)</description>
      <pubDate>Mon, 23 Feb 2004 07:56:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/paging-bill-hassell/m-p/3196844#M165890</guid>
      <dc:creator>Jakes Louw</dc:creator>
      <dc:date>2004-02-23T07:56:39Z</dc:date>
    </item>
    <item>
      <title>Re: Paging Bill Hassell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/paging-bill-hassell/m-p/3196845#M165891</link>
      <description>Thanks Jakes.&lt;BR /&gt;&lt;BR /&gt;I've tried that and it's just the same result - works fine till I change directory.&lt;BR /&gt;&lt;BR /&gt;Mark</description>
      <pubDate>Mon, 23 Feb 2004 08:02:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/paging-bill-hassell/m-p/3196845#M165891</guid>
      <dc:creator>MarkSyder</dc:creator>
      <dc:date>2004-02-23T08:02:45Z</dc:date>
    </item>
    <item>
      <title>Re: Paging Bill Hassell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/paging-bill-hassell/m-p/3196846#M165892</link>
      <description>Try this Mark&lt;BR /&gt; &lt;BR /&gt;PS1="$(hostname):\$PWD "&lt;BR /&gt; &lt;BR /&gt;</description>
      <pubDate>Mon, 23 Feb 2004 08:07:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/paging-bill-hassell/m-p/3196846#M165892</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2004-02-23T08:07:28Z</dc:date>
    </item>
    <item>
      <title>Re: Paging Bill Hassell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/paging-bill-hassell/m-p/3196847#M165893</link>
      <description>Mark,&lt;BR /&gt;&lt;BR /&gt;A Spinal Tap answer!&lt;BR /&gt;&lt;BR /&gt;Come back and I'll give you another point - it's worth 11 out of 10!&lt;BR /&gt;&lt;BR /&gt;Mark&lt;BR /&gt;&lt;BR /&gt;PS - if anyone doesn't understand the Spinal Tap reference, do yourselves a favour and rent the film. It's brilliant.</description>
      <pubDate>Mon, 23 Feb 2004 08:11:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/paging-bill-hassell/m-p/3196847#M165893</guid>
      <dc:creator>MarkSyder</dc:creator>
      <dc:date>2004-02-23T08:11:42Z</dc:date>
    </item>
    <item>
      <title>Re: Paging Bill Hassell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/paging-bill-hassell/m-p/3196848#M165894</link>
      <description>Which shell are you running as default?&lt;BR /&gt;&lt;BR /&gt;I've tested this on Bourne and Korn, and it works OK.&lt;BR /&gt;&lt;BR /&gt;Try this one:&lt;BR /&gt;&lt;BR /&gt;export PS1='hostname':`$PWD) `&lt;BR /&gt;&lt;BR /&gt;(the set of parentheses around PWD are obviously for command substitution).</description>
      <pubDate>Mon, 23 Feb 2004 08:13:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/paging-bill-hassell/m-p/3196848#M165894</guid>
      <dc:creator>Jakes Louw</dc:creator>
      <dc:date>2004-02-23T08:13:53Z</dc:date>
    </item>
    <item>
      <title>Re: Paging Bill Hassell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/paging-bill-hassell/m-p/3196849#M165895</link>
      <description>Mark,&lt;BR /&gt;&lt;BR /&gt;You need to set the PS1 prompt in your shell's rc file (.shrc, .kshrc, etc.).&lt;BR /&gt;&lt;BR /&gt;export PS1='$PWD # '&lt;BR /&gt;&lt;BR /&gt;That should do it (I think).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Mon, 23 Feb 2004 08:15:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/paging-bill-hassell/m-p/3196849#M165895</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2004-02-23T08:15:15Z</dc:date>
    </item>
    <item>
      <title>Re: Paging Bill Hassell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/paging-bill-hassell/m-p/3196850#M165896</link>
      <description>Thanks everyone.&lt;BR /&gt;&lt;BR /&gt;Mark's suggestion worked, so I don't need to try any others.&lt;BR /&gt;&lt;BR /&gt;Jakes - I'm using korn shell and exactly the same command worked the way I wanted it to when I used AIX. Strange but true.&lt;BR /&gt;&lt;BR /&gt;Pete - I've reluctantly agreed to a 0 for your second posting, but generally if someone has helped, or even tried to help but failed, I give them credit for it.&lt;BR /&gt;&lt;BR /&gt;Mark</description>
      <pubDate>Mon, 23 Feb 2004 08:27:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/paging-bill-hassell/m-p/3196850#M165896</guid>
      <dc:creator>MarkSyder</dc:creator>
      <dc:date>2004-02-23T08:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: Paging Bill Hassell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/paging-bill-hassell/m-p/3196851#M165897</link>
      <description>The key for PS1 to change PWD is to use single quotes rather than double quotes. The double quotes enclose a string BUT $ parameters are expanded before being assigned to PS1. By using single quotes, nothing is changed and $PWD is sent as is to PS1, thereby allowing the shell to expand it when it is displayed (realtime retrieval of $PWD). Here's a more interesting PS1 (for .profile) which gives you the machine or the user login and the last 2 directories for PWD:&lt;BR /&gt; &lt;BR /&gt;# Terminal character enhancements&lt;BR /&gt;&lt;BR /&gt;       export HB=$(/usr/bin/tput dim)          # dim text&lt;BR /&gt;       export HV=$(/usr/bin/tput smso)         # 1/2 bright inverse&lt;BR /&gt;       export IV=$(/usr/bin/tput bold)         # inverse&lt;BR /&gt;       export UL=$(/usr/bin/tput smul)         # underline&lt;BR /&gt;       export BL=$(/usr/bin/tput blink)        # blink&lt;BR /&gt;       export EE=$(/usr/bin/tput sgr0)         # end all enhancements&lt;BR /&gt; &lt;BR /&gt;# Some terminal do not have half-bright inverse&lt;BR /&gt;# so substitute underline&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;       if tput smso &amp;gt; /dev/null&lt;BR /&gt;       then&lt;BR /&gt;          HVUL=$HV&lt;BR /&gt;       else&lt;BR /&gt;          HVUL=$UL&lt;BR /&gt;       fi&lt;BR /&gt;HOST=$(hostname)&lt;BR /&gt;USER=$(id -un)&lt;BR /&gt;PS1='$HVUL$USER $IV${PWD##${PWD%/*/*}/}$EE # '&lt;BR /&gt;PS1='$HVUL$HOST $IV${PWD##${PWD%/*/*}/}$EE # '&lt;BR /&gt; &lt;BR /&gt;Pick the first PS1 to show the user login, the second to show the machine name. This code works on all terminals and emulators as long as $TERM matches the terminal. I've attached a simple demo script that shows some of your terminal's display enhancements.</description>
      <pubDate>Mon, 23 Feb 2004 09:31:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/paging-bill-hassell/m-p/3196851#M165897</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2004-02-23T09:31:41Z</dc:date>
    </item>
    <item>
      <title>Re: Paging Bill Hassell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/paging-bill-hassell/m-p/3196852#M165898</link>
      <description>Thanks Bill.&lt;BR /&gt;&lt;BR /&gt;That file looks very useful. I've saved it to hard disc for future use.&lt;BR /&gt;&lt;BR /&gt;Mark</description>
      <pubDate>Mon, 23 Feb 2004 09:42:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/paging-bill-hassell/m-p/3196852#M165898</guid>
      <dc:creator>MarkSyder</dc:creator>
      <dc:date>2004-02-23T09:42:51Z</dc:date>
    </item>
  </channel>
</rss>

