Re: OT: sed or awk command to add a file extension

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


On Mon, Jul 31, 2023 at 11:30:38AM +0000, olivares33561 via users wrote:

Sent from ProtonMail, encrypted email based in Switzerland.

Sent with Proton Mail secure email.

------- Original Message -------
On Friday, July 28th, 2023 at 1:38 PM, Mike Wright <nobody@xxxxxxxxxxxxxxxxxxxx> wrote:


... OR ...

you could do it the easy way:

sed -i 's/}/.eps}/' filename

Thanks to all who replied.  This sed command solution worked.  The only
thing other lines which had a "{" also added a *.eps to them but I
fixed those manually.  Not a problem because to change more than 50
lines and one or two need manual edits.  The tradeoff is fine.

Best regards,

Just a comment about sed's "-i" (edit In place) option.

Personally I avoid it.  Editing scripts are easy to mess up
and with the -i, the original file may be changed in ways
not wanted.  Unlike interactive editors, there is no undo.

Jon H. LaBadie                  jonfu@xxxxxxxxxx
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct:
List Guidelines:
List Archives:
Do not reply to spam, report it:

[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