Re: [CentOS] Feed a list of filenames to vim

2011-05-18 Thread Bowie Bailey
On 5/18/2011 1:26 PM, Les Mikesell wrote: > On 5/18/2011 12:02 PM, Bowie Bailey wrote: >> >> Right. I was referring to the shell shortcut "$(< filename)". Simple - >> Useful - and probably forgotten by the time I need it again. > That's the same thing I meant. It is $(command) which is the same

Re: [CentOS] Feed a list of filenames to vim

2011-05-18 Thread Les Mikesell
On 5/18/2011 12:02 PM, Bowie Bailey wrote: > On 5/18/2011 12:58 PM, Les Mikesell wrote: >> On 5/18/2011 11:33 AM, Bowie Bailey wrote: >>> On 5/18/2011 11:34 AM, Michael Gliwinski wrote: Note that there's also a shortcut for cat (without launching a subprocess): $ vim $(< listfi

Re: [CentOS] Feed a list of filenames to vim

2011-05-18 Thread Bowie Bailey
On 5/18/2011 12:58 PM, Les Mikesell wrote: > On 5/18/2011 11:33 AM, Bowie Bailey wrote: >> On 5/18/2011 11:34 AM, Michael Gliwinski wrote: >>> Note that there's also a shortcut for cat (without launching a subprocess): >>> >>>$ vim $(< listfile) >> That's one of those occasionally-useful tidbi

Re: [CentOS] Feed a list of filenames to vim

2011-05-18 Thread Les Mikesell
On 5/18/2011 11:33 AM, Bowie Bailey wrote: > On 5/18/2011 11:34 AM, Michael Gliwinski wrote: >> >> Note that there's also a shortcut for cat (without launching a subprocess): >> >>$ vim $(< listfile) > > That's one of those occasionally-useful tidbits that I will have > completely forgotten ab

Re: [CentOS] Feed a list of filenames to vim

2011-05-18 Thread Bowie Bailey
On 5/18/2011 11:34 AM, Michael Gliwinski wrote: > > Note that there's also a shortcut for cat (without launching a subprocess): > > $ vim $(< listfile) That's one of those occasionally-useful tidbits that I will have completely forgotten about by the time I need to use it again! :-) -- Bowie

Re: [CentOS] Feed a list of filenames to vim

2011-05-18 Thread Devin Reade
--On Wednesday, May 18, 2011 05:15:54 PM +0200 Nicolas Thierry-Mieg wrote: > what, so no-one is going to offer a better solution with emacs? Never mind the emacs vs vi flamewars. (Of which I use both fluently.) Real Sysadmins Use ed(1). ;) Of course, trying to use ed with a list of files is j

Re: [CentOS] Feed a list of filenames to vim

2011-05-18 Thread Michael Gliwinski
On Wednesday 18 May 2011 16:06:47 Bowie Bailey wrote: > > or, if you need recursive: > > $ eval vim $(find /some/dir -type f -printf '"%p" ') > > > > (shell quotes expansions automatically, but you can still ensure output > > from find is appropriately quoted manually) > > Interesting. I'm not

Re: [CentOS] Feed a list of filenames to vim

2011-05-18 Thread Tony Mountifield
In article <4dd3e087.5060...@buc.com>, Bowie Bailey wrote: > On 5/18/2011 10:42 AM, Michael Gliwinski wrote: > > How about just: > > > > $ vim *.txt > > > > or, if you need recursive: > > > > $ eval vim $(find /some/dir -type f -printf '"%p" ') > > > > (shell quotes expansions automatically, b

Re: [CentOS] Feed a list of filenames to vim

2011-05-18 Thread Bowie Bailey
On 5/18/2011 11:15 AM, Nicolas Thierry-Mieg wrote: >> On 05/17/2011 09:19 AM, Jussi Hirvi wrote: >>> There are some googlable ways to feed a list of filenames to vim, but I >>> stumble on weird results. >> [...] > what, so no-one is going to offer a better solution with emacs? > I'm sure the ensuin

Re: [CentOS] Feed a list of filenames to vim

2011-05-18 Thread Nicolas Thierry-Mieg
> On 05/17/2011 09:19 AM, Jussi Hirvi wrote: >> There are some googlable ways to feed a list of filenames to vim, but I >> stumble on weird results. > > [...] what, so no-one is going to offer a better solution with emacs? I'm sure the ensuing debate could be fruitful and provide a refreshing cha

Re: [CentOS] Feed a list of filenames to vim

2011-05-18 Thread Jerry Franz
On 05/18/2011 08:06 AM, Benjamin Franz wrote: > On 05/17/2011 09:19 AM, Jussi Hirvi wrote: >> There are some googlable ways to feed a list of filenames to vim, but I >> stumble on weird results. > [...] > > The easy way for me is 'avoid the shell - use Perl instead': > > perl -e 'my @files = grep(!

Re: [CentOS] Feed a list of filenames to vim

2011-05-18 Thread Bowie Bailey
On 5/18/2011 10:42 AM, Michael Gliwinski wrote: > On Wednesday 18 May 2011 15:09:19 Bowie Bailey wrote: $ vim `ls -1 *.txt` or this: $ vim `find /some/dir -name '*.txt'` It works with any command that outputs a list of filenames. >>> Until you have a space in a fi

Re: [CentOS] Feed a list of filenames to vim

2011-05-18 Thread Benjamin Franz
On 05/17/2011 09:19 AM, Jussi Hirvi wrote: > There are some googlable ways to feed a list of filenames to vim, but I > stumble on weird results. [...] The easy way for me is 'avoid the shell - use Perl instead': perl -e 'my @files = grep(!/^\s*$/,); chomp @files; system("vim",@files);' exampl

Re: [CentOS] Feed a list of filenames to vim

2011-05-18 Thread Michael Gliwinski
On Wednesday 18 May 2011 15:09:19 Bowie Bailey wrote: > >> $ vim `ls -1 *.txt` > >> > >> or this: > >> > >> $ vim `find /some/dir -name '*.txt'` > >> > >> It works with any command that outputs a list of filenames. > > > > Until you have a space in a filename. > > True. But unless vim has a n

Re: [CentOS] Feed a list of filenames to vim

2011-05-18 Thread Bowie Bailey
On 5/18/2011 10:26 AM, Jussi Hirvi wrote: > On 18.5.2011 16.54, Bowie Bailey wrote: >> You can also do this: >> >> $ vim `ls -1 *.txt` > That one can be accomplished in a simpler way: > > vim *.txt Yea, I thought about that after I typed it, but I left it in as an example of the general meth

Re: [CentOS] Feed a list of filenames to vim

2011-05-18 Thread Jussi Hirvi
On 18.5.2011 16.54, Bowie Bailey wrote: > You can also do this: > > $ vim `ls -1 *.txt` That one can be accomplished in a simpler way: vim *.txt - Jussi ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos

Re: [CentOS] Feed a list of filenames to vim

2011-05-18 Thread Bowie Bailey
On 5/18/2011 9:54 AM, Jason Pyeron wrote: >> -Original Message- >> From: centos-boun...@centos.org >> [mailto:centos-boun...@centos.org] On Behalf Of Bowie Bailey >> Sent: Wednesday, May 18, 2011 9:55 >> You can also do this: >> >> $ vim `ls -1 *.txt` >> >> or this: >> >> $ vim `find /some

Re: [CentOS] Feed a list of filenames to vim

2011-05-18 Thread Jason Pyeron
> -Original Message- > From: centos-boun...@centos.org > [mailto:centos-boun...@centos.org] On Behalf Of Bowie Bailey > Sent: Wednesday, May 18, 2011 9:55 > To: centos@centos.org > Subject: Re: [CentOS] Feed a list of filenames to vim > > On 5/18/2011 12:50 AM, J

Re: [CentOS] Feed a list of filenames to vim

2011-05-18 Thread Bowie Bailey
On 5/18/2011 12:50 AM, Jussi Hirvi wrote: > On 17.5.2011 19.36, Bowie Bailey wrote: >> Try this: >> >> vim `cat list` > Thanks, this really works! I tried it with all my combinations: > > OS X workstation by itself > OS X workstation -> ssh -> CentOS 4 > OS X workstation -> ssh -> CentOS 5 > > BTW,

Re: [CentOS] Feed a list of filenames to vim

2011-05-17 Thread Jussi Hirvi
On 17.5.2011 19.36, Bowie Bailey wrote: > Try this: > > vim `cat list` Thanks, this really works! I tried it with all my combinations: OS X workstation by itself OS X workstation -> ssh -> CentOS 4 OS X workstation -> ssh -> CentOS 5 BTW, with the xargs command, all of these combinations give so

Re: [CentOS] Feed a list of filenames to vim

2011-05-17 Thread Tony Mountifield
In article <4dd2a021.4080...@greenspot.fi>, Jussi Hirvi wrote: > There are some googlable ways to feed a list of filenames to vim, but I > stumble on weird results. > > With my filelist, I try to do > > cat list | xargs vim > > ...to edit the files listed in the file "list". Here's what

Re: [CentOS] Feed a list of filenames to vim

2011-05-17 Thread David Goldsmith
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 5/17/2011 12:19 PM, Jussi Hirvi wrote: > There are some googlable ways to feed a list of filenames to vim, but I > stumble on weird results. > > With my filelist, I try to do > > cat list | xargs vim > > ...to edit the files listed in the

Re: [CentOS] Feed a list of filenames to vim

2011-05-17 Thread Devin Reade
--On Tuesday, May 17, 2011 07:19:45 PM +0300 Jussi Hirvi wrote: > [root@lasso2 tempdir]# cat list | xargs vim > 3 files to edit > Vim: Warning: Input is not from a terminal > > Ok, so far, so good. And after this, the file a opens, as expected. > However, the contents show as all uppercase. And

Re: [CentOS] Feed a list of filenames to vim

2011-05-17 Thread Bowie Bailey
On 5/17/2011 12:19 PM, Jussi Hirvi wrote: > There are some googlable ways to feed a list of filenames to vim, but I > stumble on weird results. > > With my filelist, I try to do > > cat list | xargs vim Try this: vim `cat list` -- Bowie ___ Cen

[CentOS] Feed a list of filenames to vim

2011-05-17 Thread Jussi Hirvi
There are some googlable ways to feed a list of filenames to vim, but I stumble on weird results. With my filelist, I try to do cat list | xargs vim ...to edit the files listed in the file "list". Here's what happens: [root@lasso2 tempdir]# ls -l total 8 -rw-r--r-- 1 root root 0 May