Browse Source

replace white spaces with _ in file name

pull/58/head
Touhid Arastu 8 years ago
committed by GitHub
parent
commit
c72767d0f1
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      README.md

+ 4
- 1
README.md View File

@@ -26,7 +26,10 @@ Add alias to .bashrc or .zshrc:
transfer() {
# write to output to tmpfile because of progress bar
tmpfile=$( mktemp -t transferXXX )
curl --progress-bar --upload-file $1 https://transfer.sh/$(basename $1) >> $tmpfile;
base_name=$(basename $1)
# replace white spaces with (underscores) _
base_name_formated=${base_name// /_}
curl --progress-bar --upload-file $1 https://transfer.sh/$base_name_formated >> $tmpfile;
cat $tmpfile;
rm -f $tmpfile;
}


Loading…
Cancel
Save