Skip to content

Instantly share code, notes, and snippets.

@aidantwoods
Created February 10, 2017 18:29
Show Gist options
  • Save aidantwoods/cf455b382996b0c2df58edd76965ed04 to your computer and use it in GitHub Desktop.
Save aidantwoods/cf455b382996b0c2df58edd76965ed04 to your computer and use it in GitHub Desktop.
#!/bin/bash
export tmp=$(mktemp); cat $1 | while read line; do echo $line;read tmp_line </dev/tty; if [ "$tmp_line" = "" ]; then tmp_line=$line;fi;echo $tmp_line >> $tmp;done; cp $tmp $1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment