[Linux-disciples] Catching URLs on the command line
Adam Kessel
linux-disciples@bostoncoop.net
Sat, 17 Jan 2004 12:03:30 -0500
--rS8CxjVDS/+yyDmU
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Sat, Jan 17, 2004 at 11:58:58AM -0500, Stephen R Laniel wrote:
> > There are a million things you might want to do with a URL; browsing to
> > it is just one. It strikes me as against the basic nature of the unix
> > command line to have default actions associated with the complement of a
> > predicate. This is more something I would expect from Gnome and KDE as=
a
> > higher level of abstraction from what's really going on.
> I see your point, but maybe I've just been spending too much time
> with Perl. There are defaults everywhere in Perl, and programmers
> just learn to know what the default behavior is when a given
> operator doesn't get passed a variable name (e.g., 'm/(.*)/;').
> So perhaps not Unixy, but Perly?
Ah, you see, this *is* very Unixy!
The difference is subject and predicate. Or something. Perl and Unix are
both content to have sensible defaults for the *object* of a command, but
not for the command itself. E.g., many unix tools default to stdin as
the object (e.g., grep), or have some other sensible default behavior if
you just run the command. When you don't give Perl any variable to
operate on, it operates on the default variable. But there is never a
case in Perl or Unix that I'm aware of where you give it some variable
and it guesses what action to take on it.
--=20
Adam Kessel
http://bostoncoop.net/adam
--rS8CxjVDS/+yyDmU
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFACWridTf3ZklQ6qYRAqWlAJ93198CS+IS3bq2JKlUDSuuqWaiGQCgxzMP
M8BQw36C+wmCnKa21lho7Aw=
=LhbQ
-----END PGP SIGNATURE-----
--rS8CxjVDS/+yyDmU--