Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ~ls



On Thu, Nov 16, 2000 at 08:24:52PM +0900, Thomas O'Dowd wrote:
> Of course I should add that that is a slight cheat as it is my shell
> that is doing the expanding so %> echo ^*.c would work too :). ls
> doesn't do any work in this.
 
It's *always* the shell doing the expanding; ls never comes into it.

Other neat expandos:

Character class:
% ls 1[234]* 
12-Black_&_White_World.mp3  13-5ive_Gears_In_Reverse.mp3  14-B_Movie.mp3

Options:
% ls {12,14}*
12-Black_&_White_World.mp3  14-B_Movie.mp3

Range:
% ls {18..21}* # ( or <18-21>* )
18-Temptation.mp3  19-I_Stand_Accused.mp3  20-Riot_Act.mp3  21-Girls_Talk.mp3

Not:
% ls ^[012]*
30-Riot_Act.mp3
31-Love_For_Tender_demo_ends_abruptly_accidentally_left_on_master.mp3 
gh.jpg

This pattern but not that pattern:
% ls *mp3~[012]*
30-Riot_Act.mp3
31-Love_For_Tender_demo_ends_abruptly_accidentally_left_on_master.mp3

-- 
Can you sum up plan 9 in layman's terms?
It does everything Unix does only less reliably - kt


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links