Motherboard Forums


Reply
Thread Tools Display Modes

An alias for RETURNing 10 times?

 
 
qquito
Guest
Posts: n/a
 
      02-18-2012, 12:50 AM
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.
 
Reply With Quote
 
 
 
 
Barry Margolin
Guest
Posts: n/a
 
      02-18-2012, 01:06 AM
In article
<(E-Mail Removed)>,
qquito <(E-Mail Removed)> 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, (E-Mail Removed)
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
 
Reply With Quote
 
 
 
 
Bob Harris
Guest
Posts: n/a
 
      02-18-2012, 01:19 AM
In article
<(E-Mail Removed)
>,

qquito <(E-Mail Removed)> 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"'
 
Reply With Quote
 
Wes Groleau
Guest
Posts: n/a
 
      02-18-2012, 01:43 AM
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!

 
Reply With Quote
 
qquito
Guest
Posts: n/a
 
      02-18-2012, 01:45 AM
Barry, Bob: Thank you both very much! I just tried the methods your
provided, and found both work perfectly. Many thanks! -R.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Returning from Standby Robert Ehrlich Asus 1 01-02-2005 04:23 PM
Beeps after returning from sleep mode - cause Swidr Abit 0 07-27-2004 08:04 AM
P4P800 Deluxe - no returning to LAST STATE after power restored? trooper2 Asus 1 07-05-2004 06:13 AM
Any other 4PDA+ experiences?? Returning 865PERL... Scapaflow Epox 4 01-30-2004 04:12 PM
Returning a dead drive Everett Foreman Dell 2 01-16-2004 03:16 PM


All times are GMT. The time now is 10:23 AM.


Welcome!
Welcome to Motherboard Point
 

Advertisment