LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   auto url parsing on console (https://www.linuxquestions.org/questions/linux-general-1/auto-url-parsing-on-console-10228/)

bluecadet 12-17-2001 12:41 PM

auto url parsing on console
 
would i be the only person to think that some sort of bash add on that could recognise any http:// reference and download for local use invisibly would be useful?

e.g.

[user@host user]# pico http://kernel.org/ilovelinus.txt

so the url would automatically be picked up, and wget used to get the file.... and i guess you could go both ways with ftp://'s as well...

useful.. or a bit pointless?

Mik 12-18-2001 04:07 AM

Personally I wouldn't find that usefull. But I can see why others might. But would you use something like that only for viewing files? Or would it also have to work for saving files? Because I can imagine it would get a bit more complicated then. Since the shell has no knowledge of any http or ftp protocol.
And if it's just for viewing lynx always works for me. A simple command could let you view files with pico though if you really want:

wget http://kernel.org/ilovelinus.txt; pico ilovelinus.txt; rm -f ilovelinus.txt

That ofcourse wouldn't always be very neat because you might have a ilovelinus.txt already in the current directory. But you could make a nice script out of that and place the files in the /tmp directory each time.

I think it's because scripting is so powerful that things like that never get added to something like a simple shell which is ment to stay simple. It's those gui's that add a bunch of features like that but they never do manage to stay simple and small.


All times are GMT -5. The time now is 01:32 AM.