Gentoo Archives: gentoo-user

From: Neil Bothwick <neil@××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Wildcards stopped working
Date: Wed, 30 May 2007 14:54:17
Message-Id: 20070530154544.387f4836@zaphod.digimed.co.uk
In Reply to: [gentoo-user] Wildcards stopped working by Grant
1 On Wed, 30 May 2007 07:25:51 -0700, Grant wrote:
2
3 > $ ls -l *.torrent
4 > ls: invalid option -- [
5 > Try `ls --help' for more information.
6
7 Torrent files can have weird names, you probably have one named
8 "-- [kewl doodz] -- some dodgy file.torrent". The shell is expanding the
9 wildcard and passing it to ls, which thinks it is an option. The
10 standard way of avoiding this is to use "ls -l -- *.torrent". The --
11 tells ls that there are no more options and everything else is to be
12 treated as a file.
13
14
15 --
16 Neil Bothwick
17
18 "Bother," said Pooh, as the pin fell out of the grenade.

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] Wildcards stopped working Grant <emailgrant@×××××.com>