18.5.11

Upload Picture Using Terminal


Just short post for today...



#!/bin/bash

for i in "$@";do

curl -# -F "image"=@"$i" -F "key"="4907fcd89e761c6b07eeb8292d5a9b2a" http://imgur.com/api/upload.xml|

grep -Eo '<[a-z_]+>http[^<]+'|sed 's/^<.|_./U&/g;s/_/ /;s/<(.*)>/x1B[0;34m1:x1B[0m /'

done

Contoh ko save script tu sebagai imgupload
Lepas tu ko taip kat terminal

najashark@B0X:~$ chmod +x imgupload

Untuk upload image :

EnNaja@B0X:~$ ./imgupload /path/nama-image

credit: OshiriX
5 najashark.net: Upload Picture Using Terminal Just short post for today... #!/bin/bash for i in "$@";do curl -# -F "image"=@"$i" -F "key"...

No comments:

Post a Comment

Post Comment

< >