Re: set the tmp file for sed??

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

 





On 09/26/2015 04:05 PM, Patrick O'Callaghan wrote:
On Sat, 2015-09-26 at 15:30 -0600, jd1008 wrote:
On 09/26/2015 02:39 PM, bruce wrote:
Hey.

I know. This is probably really basic/subtle, but 'net searches are
coming up empty.

Doing testing of 'sed' it's generating tmp files in the base
directory. Is there a way that the 'sed' tmp dir can be set to
'/tmp'.

A sample sed cmd would be

sed -i '/foo/cat/g' abc.dat
sed -i '/foo/d' abc.dat

thanks..
One minor error

sed -i 's/foo/cat/g' abs.dat
ditto for abs.dat

Man page says:

         s/regexp/replacement/
 From "info sed":

    The `s' command can be followed by zero or more of the following FLAGS:

`g' Apply the replacement to _all_ matches to the REGEXP, not just the first.

poc

Nothing wrong with the trailing g.
Nor did I say it was the error.
The trailing g says make the change on every match in the line.

--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org



[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