Skip to main content
edited tags
Link
Philippos
  • 13.7k
  • 2
  • 42
  • 82
edited title
Link
Jill448
  • 101
  • 2

xargs gsedsed cmd error xargs: gsed: No such file or directory

Source Link
Jill448
  • 101
  • 2

xargs gsed cmd error xargs: gsed: No such file or directory

I am trying to replace the below line in myfiles.hcl file

"-var-file=${get_parent_terragrunt_dir()}/variables/eu-west-2.tfvars", 

with

"-var-file=${get_parent_terragrunt_dir()}/variables/eu-west-2.tfvars",
"-var-file=${get_parent_terragrunt_dir()}/variables/eu-west-2-prod.tfvars",

using xargs gsed cmd

 find . -name 'myfiles.hcl' | xargs grep -l 'prod' | xargs gsed -i 's|"-var-file=${get_parent_terragrunt_dir()}/variables/eu-west-2.tfvars",|"-var-file=${get_parent_terragrunt_dir()}/variables/eu-west-2.tfvars",'\\n' "-var-file=${get_parent_terragrunt_dir()}/variables/eu-west-2-prod.tfvars",|'

But I am getting an error xargs: gsed: No such file or directory