[Osaka/Yokohama/Tokushima] Looking for infrastructure/server side engineers!

[Osaka/Yokohama/Tokushima] Looking for infrastructure/server side engineers!

[Deployed by over 500 companies] AWS construction, operation, maintenance, and monitoring services

[Deployed by over 500 companies] AWS construction, operation, maintenance, and monitoring services

[Successor to CentOS] AlmaLinux OS server construction/migration service

[Successor to CentOS] AlmaLinux OS server construction/migration service

[For WordPress only] Cloud server “Web Speed”

[For WordPress only] Cloud server “Web Speed”

[Cheap] Website security automatic diagnosis “Quick Scanner”

[Cheap] Website security automatic diagnosis “Quick Scanner”

[Reservation system development] EDISONE customization development service

[Reservation system development] EDISONE customization development service

[Registration of 100 URLs is 0 yen] Website monitoring service “Appmill”

[Registration of 100 URLs is 0 yen] Website monitoring service “Appmill”

[Compatible with over 200 countries] Global eSIM “Beyond SIM”

[Compatible with over 200 countries] Global eSIM “Beyond SIM”

[If you are traveling, business trip, or stationed in China] Chinese SIM service “Choco SIM”

[If you are traveling, business trip, or stationed in China] Chinese SIM service “Choco SIM”

[Global exclusive service] Beyond's MSP in North America and China

[Global exclusive service] Beyond's MSP in North America and China

[YouTube] Beyond official channel “Biyomaru Channel”

[YouTube] Beyond official channel “Biyomaru Channel”

Tips on useful commands when you want to exclude lines that start with comments

Good evening, I'm Sato, a man whose workload is proportional to the amount of clutter on his desktop.

I often have to read and investigate various configuration files and codes during my work, and I often find myself reading and investigating various configuration files and codes.

The comments are annoying!

Have you ever thought that (especially when doing research)?

In such a case, use this alias to feel refreshed!

alias ggrep='grep -v -e "^\s*#" -e "^\s*$"'

  • From the beginning of the line #
  • followed by a space from the beginning of the line #
  • Line breaks only

Lines with 3 patterns are excluded.

Comments other than # are not supported, so please rewrite as appropriate to match the characters of the comment you want to exclude.

By the way

While writing this article,
I

that stands
for Globally R egular Expression Print

The alias name is ggrep for the simple reason that we already have commands egrep and fgrep, so it's the next best choice.

If you like it, please add it to the bottom of your .bashrc.

If you found this article helpful , please give it a like!
0
Loading...
0 votes, average: 0.00 / 10
668
X facebook Hatena Bookmark pocket
[2025.6.30 Amazon Linux 2 support ended] Amazon Linux server migration solution

[2025.6.30 Amazon Linux 2 support ended] Amazon Linux server migration solution

The person who wrote this article

About the author

Seiken Sato

I have a good sixth sense when I'm in a pinch, but I'm basically an old-school engineer.Currently, I
work in the Canadian office.