1. 程式人生 > >RHEL/Centos7 Shell tips: git/awk/sort/uniq

RHEL/Centos7 Shell tips: git/awk/sort/uniq

[email protected]:~/Google/git-android-8.1.0_r33$ git whatchanged device  |awk  -F/ '{print $2}' |sort  |uniq 

asus
common
generic
google
huawei
lge
linaro
sample
[email protected]:~/Google/git-android-8.1.0_r33$ 
[email protected]:~/Google/git-android-8.1.0_r33$ 
[email protected]

:~/Google/git-android-8.1.0_r33$ git checkout HEAD^ -- device/asus  device/common    device/lge  device/linaro