fork(1) download
  1. #!/bin/bash
  2. s='a chair x 0 y
  3. a table x 0 y
  4. a window x 0 y
  5. a computer x 0 y'
  6.  
  7. awk '$2 == "window" && $4 == "0"{$4=111}1' <<< "$s"
Success #stdin #stdout 0.01s 5464KB
stdin
Standard input is empty
stdout
a chair x 0 y
a table x 0 y
a window x 111 y
a computer x 0 y