Bash Scripting Problem
Florian Schwarz
floh at linland.de
Mon May 24 20:58:53 CEST 2004
Jan-Benedict Glaw schrieb:
>>ich möchte per Script ein Verzeichnis B erstellen, in dem Links auf alle
>>Unterordner von Verzeichnis A enthalten sind. Mein Ansatz:
>>
>>- snip -
>>for i in `find . -type d -maxdepth 1 -printf "%f\n"`
>>do
>> ln -sf $i $TARGET/$i
>>done
>>- snap -
>
>
> find . -type d -maxdepth 1 -exec ln -sf {} $TARGET/{} \;
Das Problem hierbei ist, dass find das Startverzeichnis als . findet.
Und nen ln -sf . $Target/. kommt nicht besonders gut. :o)
Kann ich das noch irgendwie umgehen?
Floh
More information about the Linux
mailing list