Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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

This comment has been minimized.

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