Re: vi

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

 



> Sent: Thursday, November 09, 2017 at 4:50 AM
> From: "Cameron Simpson" <cs@xxxxxxxxxx>
> To: "Community support for Fedora users" <users@xxxxxxxxxxxxxxxxxxxxxxx>
> Subject: Re: vi
>
> On 08Nov2017 23:58, Patrick Dupre <pdupre@xxxxxxx> wrote:
> >Actually, the issue is with the $
> [...]
> >        I would like to execute a vi command as a bash command like:
> >        vi +:1 "+1,$s/E/e/g" "+wq"  test.TXT
> >        But it does not work!
> >
> >        under vi, I would do:
> >        vi test.TXT
> >        :1
> >        :1,$s/E/e/g
> >        :wq
> >
> >        could you tell me what I am missing?
> 
> This is why you should always use single quotes (') instead of double quotes 
> (") unless there is some reason not to, such as _wanting_ to substitute a shell 
> variable into a string.
> 
> As an aside, is there a reason you want to use vi for this instead of something 
> like sed?

Can I make 2 substitutions on a single call with sed?

> 
> Cheers,
> Cameron Simpson <cs@xxxxxxxxxx> (formerly cs@xxxxxxxxxx)
> _______________________________________________
> users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
> To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
> 
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux