Regular Expression in command line with sed and awk
Let’s remember your Personal Love Song for a while.
And Replace all “
Love” word with “
Then, put your Favorite sentence as your comment here.
It is easy to replace text with text editor. But this is not the case when you need to automate repetitive task with coding. It takes simpler tools than text editor.
Luckily there is Regular Expressions, that has been around for a few decades. Regular Expression is a language for string (text) processing. Search and replace utilize pattern match.
Outside of programming language scope,
there are two linux commands helper
utilizing regular expression.
It is the
And the more advance one, the
Now you can do this with this simple command
Now, that you know regular expressions. You can reduce your search-and-replace task in your script to just a very few lines.
Regular Expression It is very helpful. I’ve been regular expression in my script for at least one decade.
How Romantic is Love ? How Numeric is Math ? Why Roman Numeral ?
- December 2016
- November 2016
- October 2016
- September 2016
- August 2016
- July 2016
- Install Awesome WM in Debian
- Install Awesome WM in Arch Linux based Distribution
- Jekyll Installation on Debian
- Jekyll Installation on Arch/Manjaro
- Install Yaourt, the AUR Helper
- Using Git for Daily Repo Updating
- Analyze Services in Linux Boot Process
- Create Your Own Monitoring Script
- Step by Step Guidance to be a Webcoder
- The Difference Between DE, Shell, WM and Compositor
- Elapsed Time, Yet Another Jekyll Liquid Port
- Create Stripes Using Inkscape to Decorate Blog Post
- Jekyll Post Archives Without Plugin
- May 2016
- April 2016
- March 2016
- February 2016