Re: vi editor

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michael P. Brininstool wrote:
I always did !!cmd to replace current line with output of cmd (notice no
':'), or :3,5!!cmd to replace lines 3-5 with output of cmd.
-----Original Message-----
From: fedora-list-bounces@xxxxxxxxxx [mailto:fedora-list-bounces@xxxxxxxxxx]
On Behalf Of Les Mikesell
Sent: Monday, June 26, 2006 9:28 AM
To: For users of Fedora Core releases
Subject: Re: vi editor

On Mon, 2006-06-26 at 16:43 +0800, Ed Greshko wrote:
Inside vi editor when I am in command mode

For Example : If I want to know the hostname or pwd command How do i execute inside the Vi Editor while editing a file in command mode
Type...

:!pwd   or any other shell command

Or, if you would like the output of that command inserted into your text,
use

:r !pwd

or any other command.  Oddly, that space before the ! is important.

--
  Les Mikesell
   lesmikesell@xxxxxxxxx


!! is the proper way, but you can specify the shell.

!!sh
!!csh
!!bash

etc.

For really geeky guys, write a line of perl script, then:
!!perl

cool stuff.

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux