나는 출력 다음 한 git status
어떻게 작업을 수행 grep
한 후 모든 것을를 Untracked files
:
[alexus@wcmisdlin02 Test]$ git status
# On branch master
#
# Initial commit
#
# Changes to be committed:
# (use "git rm --cached <file>..." to unstage)
#
# new file: app/.gitignore
# new file: app/app.iml
# new file: app/build.gradle
# new file: app/proguard-rules.pro
# new file: app/src/androidTest/java/org/alexus/test/ApplicationTest.java
# new file: app/src/main/AndroidManifest.xml
# new file: app/src/main/java/org/alexus/test/MainActivity.java
# new file: app/src/main/res/layout/activity_main.xml
# new file: app/src/main/res/menu/menu_main.xml
# new file: app/src/main/res/mipmap-hdpi/ic_launcher.png
# new file: app/src/main/res/mipmap-mdpi/ic_launcher.png
# new file: app/src/main/res/mipmap-xhdpi/ic_launcher.png
# new file: app/src/main/res/mipmap-xxhdpi/ic_launcher.png
# new file: app/src/main/res/values-w820dp/dimens.xml
# new file: app/src/main/res/values/dimens.xml
# new file: app/src/main/res/values/strings.xml
# new file: app/src/main/res/values/styles.xml
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# .gitignore
# .idea/
# Test.iml
# build.gradle
# gradle.properties
# gradle/
# gradlew
# gradlew.bat
# settings.gradle
[alexus@wcmisdlin02 Test]$
이처럼 -A
GNU 의 매개 변수 와 같이 줄 수를 지정하지 않으면 grep
:
[alexus@wcmisdlin02 Test]$ git status | grep -A100 'Untracked files'
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# .gitignore
# .idea/
# Test.iml
# build.gradle
# gradle.properties
# gradle/
# gradlew
# gradlew.bat
# settings.gradle
[alexus@wcmisdlin02 Test]$
그것을 할 수있는 방법이 있습니까?
[alexus@wcmisdlin02 Test]$ grep --version
grep (GNU grep) 2.20
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://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.
Written by Mike Haertel and others, see <http://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>.
[alexus@wcmisdlin02 Test]$
-A
인수로 충분히 큰 숫자 를 사용할 수없는 이유는 무엇 입니까?