[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [TEKNIK] Omdøbning af mange filer



> Jeg bruger en lille ting, strikket sammen via:
> for i in * ; do j=`echo $i | sed 's#searchstring#replacestring#g' - ` ; mv
> "$i" "$j" ; done
>
> Har dette i en .sh:
> for i in * ; do j=`echo $i | sed "s#$1#$2#g" - ` ; mv "$i" "$j" ; done
>
> Kaldes med "script.sh .JPG .jpg"
>
> Jeg bruger den til at rename f.eks. filer fra et kamera fra .JPG til
> .jpg (nødvendig når 2 filer skal linkes på en apache, og har været
> igennem gimp...)
>
> Den tager vist ikke mapper, og vist ikke recursive.
> Har ikke prøvet :-)

Så vidt jeg lige kan se, så traverserer den ikke et directorytræ
rekursivt. Der ud over er problemet jeg har, at min rename skal ét ud af
en liste af tegn til en _, og at det skal gøres for alle de tegn i listen,
som findes i filnavnet. Det ved jeg ikke om dit script gør. Umiddelbart
lyder det ikke sandsynligt, da du kan bruge det til at lave JPG om til
jpg.

-- Jens



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2012-07-01, 02:01 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *