in shell | usage

| operator

The pipe symbol is a very powerful feature of Unix. The symbol is a vertical bar: "|".
usage:
command 1 | command 2
Its function is to pass the result of the execution of the first command command 1 to command 2 as the input of command 2
example:
ideviceinstaller -u udid -l|awk '{print $1}'|grep com.test.XXXX
ideviceinstaller -u udid -l List installed third-party apps
awk '{print $1}' keep the third-party application results from the previous row in the first column
grep com.test.XXXX searches for com.test.XXXX in the first reserved column

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325145476&siteId=291194637