Hello, stardiviner <numbch...@gmail.com> writes:
> I tried the following example: > > ``` > > #+begin_src shell :mkdir yes :dir "data/tmp" :results file :file > "crackzor_1.0.c.gz" > wget -c "http://ben.akrin.com/crackzor/crackzor_1.0.c.gz" > #+end_src > > #+RESULTS: > [[file:data/tmp/crackzor_1.0.c.gz]] > ``` > > But the files is empty, I check out Org-mode document about `:file` > header argument, seems org-babel will write result to `:file` specified > file. I wander how I can handle upper case correctly? (don't write > result to file, just insert a link to downloaded file as a result) well, your above example would work, at least to a certain point, if you let wget write its output to stdout: #+begin_src sh :mkdir yes :dir "/tmp" :results file :file "crackzor_1.0.c.gz" wget -c "http://ben.akrin.com/crackzor/crackzor_1.0.c.gz" -O- #+end_src But I don't now know how to get the encoding right (I think that's the problem). The zip file contains rubbish. What I would do instead is something like this: #+begin_src sh :mkdir yes :dir "/tmp" :results raw :var fn="crackzor_1.0.c.gz" /usr/bin/wget -c "http://ben.akrin.com/crackzor/${fn}" echo "[[file:/tmp/${fn}]]" #+end_src Regards hmw