Windows Subsystem for Linux(WSL、Windows-10コンピューター上のUbuntuアプリ)でgrep
結果の配色を変更したいと思います。
私の.bashrc
ファイルには次のエントリが含まれています。
alias grep='grep --color=auto'
環境変数GREP_COLOR
とGREP_COLORS
はどちらも空です。
Prompt> echo $GREP_COLOR
Prompt> echo $GREP_COLORS
=> two times an empty result.
私のgrep
バージョン:
Prompt> grep --version
grep (GNU grep) 3.4
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
この質問の理由は、 grep "text" *
が次の結果をもたらすためです。
file1.txt : here is text
file2.txt : here is text too
ファイルの名前(file1.txtとfile2.txt)はどちらも紫色で、黒い背景では見づらいです。
誰かがこれを行う方法を知っていますか?