fork(1) download
  1. objects=shubham
  2. awk -v myvar="^hello[(]'$objects'[)]\$" '($0~myvar),/REPLACE/' <<'EOF'
  3. other-unwanted-content-here
  4. target(shubham)
  5. hello('shubham')
  6. abc
  7. bcd
  8. REPLACE
  9. other-unwanted-content-here
  10. EOF
  11.  
Success #stdin #stdout 0.01s 5508KB
stdin
Standard input is empty
stdout
hello('shubham')
abc
bcd
REPLACE