Hwarf Nugen

Pages

  • Home

Wednesday, January 20, 2010

Perl Find and Replace One Liner

I'm constantly needing a way to easily change a line in a bunch of configuration files. I thought I'd share the way I do it here.

perl -p -i -e 's/oldstring/newstring/g' *

This allows you to use a regular expression and perform the find and replace.
Posted by Unknown at 3:37 PM 2 comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Labels: HOWTOs, Sys Admin
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

About Me

Unknown
View my complete profile

Labels

apache centos cli dns howto HOWTOs htaccess http linux mp3 m3u music mysql netbackup networking pfsense proxmox Rants rhce rhel selinux selinux apache mysql ssh svn Sys Admin sysadmin Technology / Computing veritas vmware

Popular Posts

  • HOWTO: Set the SSHD Idle Timeout
  • Configure PhpStorm to Auto-complete CakePHP Models, Views, and Controllers
  • DNS Caching and Forwarding with Unbound

Blog Archive

  • ►  2015 (5)
    • ►  March (3)
    • ►  February (1)
    • ►  January (1)
  • ►  2014 (2)
    • ►  February (2)
  • ►  2012 (2)
    • ►  August (2)
  • ►  2011 (1)
    • ►  August (1)
  • ▼  2010 (2)
    • ►  April (1)
    • ▼  January (1)
      • Perl Find and Replace One Liner
  • ►  2009 (3)
    • ►  June (1)
    • ►  April (1)
    • ►  March (1)
  • ►  2008 (4)
    • ►  June (1)
    • ►  May (1)
    • ►  February (2)
  • ►  2007 (1)
    • ►  October (1)

Interesting Articles

Loading...
Simple theme. Powered by Blogger.