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
gsedcommand on your system?