fork download
  1. #!/bin/bash
  2. s="with redirection >/dev/null 2>&1"
  3. sed 's+>\{1,2\}[[:space:]]*/dev/null[[:space:]]*2>&1++g' <<< "$s"
  4. sed -E 's+>{1,2}\s*/dev/null\s*2>&1++g' <<< "$s"
Success #stdin #stdout 0s 4444KB
stdin
Standard input is empty
stdout
with redirection 
with redirection