FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.

» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

LinkBack Thread Tools
Old 04-09-2012, 01:09 AM
Dr Beco
Default (solved) Double quotes, single quotes

> Dr Beco wrote:
> >
> > $vi +"r ! find . -name 'error*' -printf '%f
'" themain.c
> >
> Bob wrote:
> The problem you are hitting is that vim is expanding the % itself and
> isn't passing it to bash nor on to find. *It isn't related to quoting.
> It is related to vi's percent expansion. *Use something other than
> percent to avoid the problem. *In vi the '%' is replaced by the
> current filename. *That is traditional vi behavior.
> For 'find' you can use the default -print case by not specifying anything.
> * vim +"r ! find . -name 'error*'" themain.c
> Bob

Hi Bob,

Thanks! You clarified a trick problem. After what you said, I tried:

vim +"r ! find . -name 'error*' -printf '\%f
'" themain.c

And voilá! It worked! Just scape the % and you can use it, as vi
passes to find the correct char %.


To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: CALuYw2zc_LWDbVJq1NnuqcLPn89+ZsO_kjZH5u6cR1J3XEtj5 w@mail.gmail.com">http://lists.debian.org/CALuYw2zc_LWDbVJq1NnuqcLPn89+ZsO_kjZH5u6cR1J3XEtj5 w@mail.gmail.com

Thread Tools

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

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org