daily pastebin goal
39%
SHARE
TWEET

Untitled

a guest Jan 20th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. # produce dd/mm/yyyy date, other formats possible
  3. date=$(date +"%d/%m/%Y")
  4. # see https://stackoverflow.com/questions/407523/escape-a-string-for-a-sed-replace-pattern
  5. escaped_date=$(echo "$date" | sed 's/[/&]/\&/g')
  6. sed -i 's/$(date)/'"$escaped_date"'/g' "$*"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top