An alias for RETURNing 10 times?

Discussion in 'Apple' started by qquito, Feb 18, 2012.

  1. qquito

    qquito Guest

    Hello, Everyone:

    I use the X window a lot on a Mac OS X (Version 10.6.8).

    Very often, I knock the RETURN key a number of times to create a wide
    enough space to separate the earlier displayed stuff in the the
    window from the stuff that will display next. Although the command
    "clear" does clear the window, but it does not create any space
    between the old and new stuff.

    So the question: Can I create a simple alias that would be equivalent
    to knocking the RETURN key, say 10 or 20, times? The critical part of
    the question is how to express the RETURN key in an alias expression.

    Thank you for reading and replying!

    --R.
     
    qquito, Feb 18, 2012
    #1
    1. Advertising

  2. In article
    <>,
    qquito <> wrote:

    > Hello, Everyone:
    >
    > I use the X window a lot on a Mac OS X (Version 10.6.8).
    >
    > Very often, I knock the RETURN key a number of times to create a wide
    > enough space to separate the earlier displayed stuff in the the
    > window from the stuff that will display next. Although the command
    > "clear" does clear the window, but it does not create any space
    > between the old and new stuff.
    >
    > So the question: Can I create a simple alias that would be equivalent
    > to knocking the RETURN key, say 10 or 20, times? The critical part of
    > the question is how to express the RETURN key in an alias expression.
    >
    > Thank you for reading and replying!
    >
    > --R.


    spaces () { for (( i=${1:-10}; i--; )) ; do printf "\n"; done }

    "spaces N" will print N blank lines. "spaces" with no argument defaults
    to N = 10.

    --
    Barry Margolin,
    Arlington, MA
    *** PLEASE post questions in newsgroups, not directly to me ***
     
    Barry Margolin, Feb 18, 2012
    #2
    1. Advertising

  3. qquito

    Bob Harris Guest

    In article
    <
    >,

    qquito <> wrote:

    > Hello, Everyone:
    >
    > I use the X window a lot on a Mac OS X (Version 10.6.8).
    >
    > Very often, I knock the RETURN key a number of times to create a wide
    > enough space to separate the earlier displayed stuff in the the
    > window from the stuff that will display next. Although the command
    > "clear" does clear the window, but it does not create any space
    > between the old and new stuff.
    >
    > So the question: Can I create a simple alias that would be equivalent
    > to knocking the RETURN key, say 10 or 20, times? The critical part of
    > the question is how to express the RETURN key in an alias expression.
    >
    > Thank you for reading and replying!
    >
    > --R.


    alias sep='echo -e "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"'
     
    Bob Harris, Feb 18, 2012
    #3
  4. qquito

    Wes Groleau Guest

    On 02-17-2012 19:50, qquito wrote:
    > So the question: Can I create a simple alias that would be equivalent
    > to knocking the RETURN key, say 10 or 20, times? The critical part of


    perl -e 'print 10 * "\n";'

    Shoot, I know I have done this before, and it is _similar_ to the above,
    but the above is not quite right.

    Or there's the odd-looking but simple
    iMac:webtrees wgroleau$ echo "
    >
    >
    >
    >
    >
    >
    >
    >
    >
    > " # that actually makes ten line ends.












    iMac:webtrees wgroleau$


    --
    Wes Groleau

    Don't get even; get odd!
     
    Wes Groleau, Feb 18, 2012
    #4
  5. qquito

    qquito Guest

    Barry, Bob: Thank you both very much! I just tried the methods your
    provided, and found both work perfectly. Many thanks! -R.
     
    qquito, Feb 18, 2012
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Swidr
    Replies:
    0
    Views:
    325
    Swidr
    Jul 27, 2004
  2. trooper2
    Replies:
    1
    Views:
    308
  3. Robert Ehrlich

    Returning from Standby

    Robert Ehrlich, Jan 2, 2005, in forum: Asus
    Replies:
    1
    Views:
    314
    Willie
    Jan 2, 2005
  4. Scapaflow
    Replies:
    4
    Views:
    382
    Mark N
    Jan 30, 2004
  5. Everett Foreman

    Returning a dead drive

    Everett Foreman, Jan 16, 2004, in forum: Dell
    Replies:
    2
    Views:
    281
    Christopher Muto
    Jan 16, 2004
Loading...

Share This Page