GithubHelp home page GithubHelp logo

dl's Introduction

dl - fetch remote file for convenient local reading

(That's lowercase "DL".)

dl will fetch a document at a given URI, save to a temporary file,
and then print its local path to standard output.  This behavior
makes dl handy on the Unix/Linux command line for treating remote
URIs like local files.  For example:

 less `dl http://www.ietf.org/rfc/rfc3454.txt`
 xpdf $(dl http://www.cs.harvard.edu/~malan/resources/cheatsheet.pdf)
 emacs $(dl ftp://rtfm.mit.edu/pub/net/internet.text)

dl supports the HTTP, HTTPS and FTP protocols.  It depends on wget
for downloading; thus you must have wget installed.

Error handling: In the event the document cannot be fetched, dl will
emit a warning to stderr, print nothing to stdout, and yield a
nonzero exit code.  You might want to consider whether the invoked
primary command (e.g., "less", "xpdf" or "emacs" in the examples
above) will fail gracefully enough if this happens.

dl is in the public domain.  If it breaks, you get to keep both pieces.

INSTALL

Just save the file dl.sh as "dl", somewhere in your $PATH.  (It has
the .sh extension here to keep github from being confused about the
file type.)  Make sure that it has the execute bit set (chmod +x dl).

dl's People

Contributors

redsymbol avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.