-1

i would like to get help to convert this search string to windows command :

grep taapAccessTokenTrustedAudiences * | grep -v credentials | grep -v application-cloud.yml

2 Answers2

1

Hi
You should replace the grep with findstr and -v with /V
This command:

grep taapAccessTokenTrustedAudiences * | grep -v credentials | grep -v application-cloud.yml

Will be like that in windows:

findstr "taapAccessTokenTrustedAudiences" * | findstr /V "credentials" | findstr /V "application-cloud.yml"
azibom
  • 1,769
  • 1
  • 7
  • 21
0

You can use Select-String:

Get-Content Application-Cloud.yml | Select-String ("taapAccessTokenTrustedAudiences *") | Select-String -NotMatch ("credentials")

Select-String on it's own will act as a normal grep and Select-String -NotMatch as grep -v

Raman Sailopal
  • 12,320
  • 2
  • 11
  • 18