[olug] Unix Tip: VI EXECUTION

Unix Guru Universe listserv at ugu.com
Mon Apr 28 20:39:44 UTC 2003


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

			      UNIX GURU UNIVERSE 
			         UNIX HOT TIP

			Unix Tip 1944 - April 28, 2003

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

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


VI EXECUTION

While writing shell scripts 
in vi, have you ever considered
the time wasted by going in 
and out of vi to test your 
commands by executing them on 
the command line.

To increase your productivity, 
it would be a lot quicker if you 
could execute these commands 
from within the editor and view 
their output before writing them 
to your script.

This is possible and quite 
straight forward.  Enter the 
following within vi

:!testscript

(i.e. colon exclamation mark)

Then enter your command as you 
would at the $ or # prompt.  

The command executes, the result 
is displayed and you are propmted 
to press return to continue.


This tip generously supported by:
michael.byrne at nuinternational.com




--------------------------------------------------------------------------
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 - tips at ugu.com - Copyright 1994-2001
==========================================================================



More information about the OLUG mailing list