nick34992
2/20/2017 - 2:58 AM

Bash: echo, exec, cat: File Descriptor for Writing or Truncating Mode

Bash: echo, exec, cat: File Descriptor for Writing or Truncating Mode

#!/bin/bash

exec 4>output.txt
echo newline >&4
cat output.txt
# newline