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

Re: a feature I wish rc had



>> It would be especially powerful if one could take things
>> out of implicit lists, ie say 'all filenames of this pattern, except
>> filenames of that pattern' conveniently.
	
>i've always wanted this in a shell, but never found a convenient notation  
>for it.  if someone can suggest one, it's certainly a potential es feature.
>
>i just use ``ls|grep -v'' usually.

I usually use sed to do this kind of list manipulation, for example
when we have net problems one of the following works quite well to pull
the NFS mounted partions out of my path.

	path=`{echo $path | sed 's:/usr/share/bin::'}

	eval `{whatis path | sed 's:/usr/share/bin::'}

The second could easily be turned into a general function to do the
job, but being able to fetch it out of my history makes that more
bother (and clutter in the environment) than it's worth.

Anybody feel like producing an all builtin function for this? 
Something like "remove pattern list" or "remove index list".  It
shouldn't be too hard.