Skip to content

Instantly share code, notes, and snippets.

@ampledata
Created February 7, 2011 22:44
Show Gist options
  • Save ampledata/815419 to your computer and use it in GitHub Desktop.
Save ampledata/815419 to your computer and use it in GitHub Desktop.
i want to have the same thing for dinner
# pack lunch
echo "i like tacos" > lunch.txt
# pack dinner
echo "i like burritos" > dinner.txt
# generate ed-style diff
diff -e dinner.txt lunch.txt > order.ed
# add a write to the end of the diff
echo 'w' >> order.ed
# make dinner
ed - dinner.txt < order.ed
@ampledata
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment