Re: vi editor

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

 



On Wed, 2006-07-12 at 17:20 -0600, Phil Meyer wrote:
> > 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.
> >

> >   
> !! 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.

!! is for a single line in the buffer.
You can also write the whole buffer to a pipe with:
:w !sh
or 
:w !perl
or to just test if your perl is valid before saving
:w !perl

And in this case the space before the ! really is needed. With the
:r, is wasn't.

And if you would like the output of the program to replace the
current contents of the edit buffer
1!G  <-go to top, filter, range through end
programname   <-program to act as filter - for example sort.
all the usual range selection methods would work if you don't want
to pass the whole buffer.

-- 
 Les Mikesell
  lesmikesell@xxxxxxxxx


-- 
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