A Generation Lost in the Bazaar - Poul-Henning Kamp article

Chris F.A. Johnson chris-E7bvbYbpR6jSUeElwK9/Pw at public.gmane.org
Thu Aug 23 00:15:28 UTC 2012


On Wed, 22 Aug 2012, phiscock-g851W1bGYuGnS0EtXVNi6w at public.gmane.org wrote:

>
>> On 12-08-22 06:37 PM, phiscock-g851W1bGYuGnS0EtXVNi6w at public.gmane.org wrote:
>>> What happens when you do ls -d? You get '.'
>> [snip]
>>> In other words, if you use ls -d, it tells you 'you are in the current
>>> directory', or more colloquially: you are where you are. That's not a
>>> huge
>>> amount of information.
>>
>> Definitely not what one would call useful information. No matter where you
>> are, you are always in the current directory.  ;-)
>>
>> All it takes is for someone to be annoyed enough at a missing feature for
>> them to go in and add the feature. So, where is the patch, Peter.  ;-)
>>
>> Sometimes you can be in for a bit of a battle to get changes in to long
>> standing programs. 'ls -d */' while not that intuitive works well. I
>> learned
>> something new today. :-)
>>
>
> I wonder how many shell scripts would break if you changed the operation
> of ls -d? You'd have to make a new option.

    Or write a wrapper function for ls that implements, say, -D.

    Or use the function I posted earlier.

-- 
    Chris F.A. Johnson, <http://cfajohnson.com/>
    Author:
    Pro Bash Programming: Scripting the GNU/Linux Shell (2009, Apress)
    Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list