Home > database >  The shell variable string, the third column of the print out to satisfy the two conditions
The shell variable string, the third column of the print out to satisfy the two conditions

Time:10-06

Type the file content is as follows:
Testa a ABC
Testa ABC a - 1
ACB testa1 a - 1

Asked, and when a variable is equal to a - 1 and meet the conditions of teata, print out the third column shell commands, how to write?

CodePudding user response:

The string to the variable $, satisfy the testa, just dozen wrong

CodePudding user response:

When the variable is a print out:
Testa a ABC
Testa ABC a - 1
How to achieve print results for testa a ABC only this line

CodePudding user response:

The grep "$l" \ type
  • Related