I know Howard does a great job of coming up with command line tips
for the meetings.  But here is one I forgot that I remember seeing a long
time ago that can actually be useful.

There is a 'tip of the day' available at www.ugu.com

They are good about not passing out your info in case you are ID paranoid
like we all should be to some extent.
Subscribe/unsubscribe info is available at the bottom of the message.

><> ... Jack
Whatever you do, work at it with all your heart... Colossians 3:23

"You don't manage people; you manage things. You lead people."
"It’s easier to ask forgiveness than it is to get permission" — Grace
Hopper, US Navy Admiral


---------- Forwarded message ----------
From: Unix Guru Universe <[email protected]>
Date: Fri, Sep 23, 2011 at 2:35 AM
Subject: Unix Tip: HOW MANY COMMANDS HAVE I RUN?



=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

                             UNIX GURU UNIVERSE
                                UNIX HOT TIP

                       Unix Tip 3514 - September 23, 2011

                   http://www.ugu.com/sui/ugu/show?tip.today

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


HOW MANY COMMANDS HAVE I RUN?

If you're a csh/tcsh/zsh user, you've seen the supposed feature
that lets you display how many commands you've run in your
prompt:

       set prompt="\! %"

The \! (or %h or %! for tcsh) displays not really a current
count of commands run, but the current history event number.

Think of it in those terms, and you'll discover it becomes quite
useful.

For example, how many times have you typed some enormously long
command line, only to have it fail because several other conditions
weren't met?

You spend the next several prompts typing various commands to
get conditions set up just right, and then have to retype the
entire long command.

Or, if it hasn't scrolled off the screen yet, just type ! followed
by the history event number displayed in the prompt for that big
long command.  It's that simple:

prompt 23 % command -with some -very +long /argument/list
command: Example command failed.
prompt 24 % cd /to/correct/directory
prompt 25 % rm certain.files
prompt 26 % !23
command -with some -very +long /argument/list
command: Example command succeeds.
prompt 27 %

You can even apply the standard csh modifiers to !<number>.  For
example, particularly useful is !<number>:p, which just prints
the command typed on prompt <number> instead of executing it
again:

prompt 26 % !23:p
command -with some -very +long /argument/list
prompt 27 % !!
command -with some -very +long /argument/list
command: Example command succeeds.
prompt 28 %


--------------------------------------------------------------------------
To Subscribe:    http://www.ugu.com/sui/ugu/show?tip.subscribe
To Unsubscribe:  http://www.ugu.com/sui/ugu/show?tip.unsubscribe
To Submit A Tip: http://www.ugu.com/sui/ugu/show?tip.today

==========================================================================
DISCLAIMER: All UNIX HOT TIPS ARE OWNED BY THE UNIX GURU UNIVERSE AND ARE
NOT TO BE SOLD, PRINTED OR USED WITHOUT THE WRITTEN CONSENT OF THE UNIX
GURU UNIVERSE. ALL TIPS ARE "USE AT YOUR OWN RISK". UGU  ADVISES THAT
ALL TIPS BE TESTED IN A NON-PRODUCTION DEVELOPMENT ENVIRONMENT FIRST.

Unix Guru Universe - www.ugu.com - [email protected] - Copyright 1994-2001
==========================================================================

-- 
You received this message because you are subscribed to the Google Groups 
"NLUG" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nlug-talk?hl=en

Reply via email to