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

[OT] regex



Привет всем.

Что-то я с sed не могу объяснится:

$ ls
01-J'ysuis jamais alle.wav                   
02-Les joors tristes.wav                     
03-La Vaise d'Amelie.wav                  

$ ls | sed -e s/.wav$// | sed -e s/^[0-9]\{,4\}-//
01-J'ysuis jamais alle
02-Les joors tristes
03-La Vaise d'Amelie

Почему не убирает циферки с черточкой вначале имени?
Тупое 
$ ls | sed -e s/.wav$// | sed -e s/^[0-9][0-9]-// 
работает, но иногда бывают файлы с 3/4-значными номерами...

-- 
Матвийчук Олег aka Matvey, LRU#349092
http://mathway.narod.ru

I am the "ILOVEGNU" signature virus. Just copy me to your signature.
This email was infected under the terms of the GNU General Public License.

Птичка Божия не знает не забот и не хлопот
Лишь летает и воняет, хриплым голосом поет Moby - ain't never loarned



Reply to: