Permalink
Browse files

properly safe use of expansion.

  • Loading branch information...
1 parent b467984 commit 7b562938eec2d0d42ef46fd6b0a194f3aee1a02d @jzacsh committed Nov 28, 2011
Showing with 4 additions and 4 deletions.
  1. +4 −4 share/etherback
View
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
-DOC_URI=$1
-BAK_DIR=$2
+DOC_URI="$1"
+BAK_DIR="$2"
DOC_PRE='todo_'
DOC_SUF='.pad.bak'
@@ -20,8 +20,8 @@ usage() {
backup() {
local rfc_date seconds
- rfc_date=$(date --rfc-3339=date)
- seconds=$(date +%s)
+ rfc_date="$(date --rfc-3339=date)"
+ seconds="$(date +%s)"
curl -s --fail "$DOC_URI" > "$BAK_DIR/${DOC_PRE}${rfc_date}_${seconds}${DOC_SUF}"
local c_ret=$?
(( c_ret )) && {

0 comments on commit 7b56293

Please sign in to comment.