mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-09 02:24:03 +01:00
17 lines
308 B
Bash
17 lines
308 B
Bash
# Upload files to flag.io
|
|
upload() {
|
|
local file
|
|
|
|
if [ $# -lt 1 ]; then
|
|
printf 'usage: upload <file> [<file> ...]\n'
|
|
return 1
|
|
fi
|
|
|
|
for file in $@; do
|
|
if [ -f "$file" ]; then
|
|
curl -sT "$file" flag.io | egrep -v '^#'
|
|
else
|
|
printf 'File not found: %s\n' "$file"
|
|
fi
|
|
done
|
|
}
|