Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Changes
Page history
gnachman created page: Base64FileDownload
authored
Apr 29, 2015
by
George Nachman
Hide whitespace changes
Inline
Side-by-side
Base64FileDownload.markdown
0 → 100644
View page @
ab6a0a9b
To download a file in 2.9.x builds, use this script:
````
#!/bin/bash
if
[
$#
-ne
1
]
;
then
echo
"Usage: download.sh file ..."
exit
1
fi
for
fn
in
"
$@
"
do
if
[
-r
"
$fn
"
]
;
then
printf
'\033]1337;File=name='
`
echo
-n
"
$fn
"
|
base64
`
";"
wc
-c
"
$fn
"
|
awk
'{printf "size=%d",$1}'
printf
":"
base64
<
"
$fn
"
printf
'\a'
else
echo
File
$fn
does not exist or is not readable.
fi
done
````
Usage:
`download.sh /file/to/download`
iTerm2 will add the file to the Downloads menu, where its progress can be tracked. It's not as fast as secure copy, but it's very convenient.