Moin,
* Peter Schütt wrote (2006-05-01 13:45):
>ich, Debian/Testing/Unstable/2.6.16 habe folgende Dateistruktur:
>
>dir1/file1 .. file10
>dir2/file11.. file20
>usw.
>
>und ich möchte mittels eines Skripts alle diese Dateien in einen Ordner
>kopieren, so daß die der Verzeichnisname im Dateinamen ist.
>also:
>
>dir1_file1
>dir1_file2
>dir1_file3
>...
>dir2_file11
>dir2_file12
>...
Mit der Zsh, ungetestet:
zmv '(dir?)/(file*)' '$1_$2'
Thorsten
--
There must be a parallel universe where Starbucks sells cocaine in dilute,
controlled, taxed doses, but where (crack) caffiene is sniffed and smoked
in huge binges, and smuggled in by evil Columbian cartels.
- Rogerborg
Attachment:
pgpLJoLtPGDPE.pgp
Description: PGP signature