a guest Mar 19th, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- # USE: prepend <filename> "The string to prepend"
- # Works like echo "text" >> <filename>, but opposite
- # Useful for adding "# Project title" to the top of a new readme
- tmp="temp".$(date +%s)
- echo "$2" > $tmp
- cat "$1" >> $tmp
- cat $tmp > "$1"
- rm $tmp
RAW Paste Data