Dies ist eine statische Kopie unseres alten Forums. Es sind keine Interaktionen möglich.
This is a static copy of our old forum. Interactions are not possible.
  • "Ernestinum[xic]" is male
  • "Ernestinum[xic]" started this thread

Posts: 83

Date of registration: Oct 15th 2003

Location: Hannover

Occupation: finde ich interessant!

1

Thursday, April 1st 2004, 9:54pm

brauch mal schnell hilfe: Bashscript

so bin hier schon länger am tüfteln bekomme es aber nicht hin, ich habe 400 dateien in einem
ordner auf einem linux rechner und versuche mich daran irgendwie nen bash sript zu schreiben
was mir mit einem befehl alle endungen *.sdc in *.sdcopen umbenennt ohne dass ich jetzt
400 x per hand mv .... eingeben muss, habe leider kein lappi hier oder so. also
müsste schon nen script sein, was ich dort eingeben könnte, da auch der rechner
kein inet hat!
wäre cool wenn jemand ne idee oder ne lösung hätte für das problem!

Arne

ThI

  • "Arne" is male

Posts: 1,798

Date of registration: Oct 7th 2002

Location: Hannover :)

Occupation: Lecturer ThI

2

Thursday, April 1st 2004, 10:05pm

schonmal das probiert:

Source code

1
mv *.sdc *.sdcopen
"NP - The class of dashed hopes and idle dreams." Complexity Zoo

  • "Ernestinum[xic]" is male
  • "Ernestinum[xic]" started this thread

Posts: 83

Date of registration: Oct 15th 2003

Location: Hannover

Occupation: finde ich interessant!

3

Thursday, April 1st 2004, 10:11pm

hups daran gar nicht gedacht mal testn wie peinlich :(

  • "Joachim" is male

Posts: 2,863

Date of registration: Dec 11th 2001

Location: Hämelerwald

Occupation: Wissenschaftlicher Mitarbeiter (Forschungszentrum L3S, TU Braunschweig)

4

Thursday, April 1st 2004, 10:16pm

Quoted

Original von vier
schonmal das probiert:

Source code

1
mv *.sdc *.sdcopen


Nein, das wird nicht funktionieren.

Das Unix-Tool mmv kann hier helfen.
The purpose of computing is insight, not numbers.
Richard Hamming, 1962

  • "Ernestinum[xic]" is male
  • "Ernestinum[xic]" started this thread

Posts: 83

Date of registration: Oct 15th 2003

Location: Hannover

Occupation: finde ich interessant!

5

Thursday, April 1st 2004, 10:20pm

hm geht nicht
fehlermeldung ist
mv: Target h95a_118.sdc must be a directory
Usage:
bla bla

also ich glaube dass hier der rechner bissel alt ist und deswegen wohl der befehl
irgendwie wohl net funzt!
gibts ne andere möglichkeit
also habe im inet modifiziert das hier gefunden:
for file in `ls *.sdc`; do mv $file ${file%.sdc}.sdcopen; done


da sagt er "variable bla"

  • "Ernestinum[xic]" is male
  • "Ernestinum[xic]" started this thread

Posts: 83

Date of registration: Oct 15th 2003

Location: Hannover

Occupation: finde ich interessant!

6

Thursday, April 1st 2004, 10:22pm

mmv standard auf linux rechnern drauf? ich meine nicht und ich kann da leider nichts raufspielen!

  • "Joachim" is male

Posts: 2,863

Date of registration: Dec 11th 2001

Location: Hämelerwald

Occupation: Wissenschaftlicher Mitarbeiter (Forschungszentrum L3S, TU Braunschweig)

7

Thursday, April 1st 2004, 10:25pm

Quoted

Original von Ernestinum[xic]
mmv standard auf linux rechnern drauf? ich meine nicht und ich kann da leider nichts raufspielen!
Jein, nur bei manchen Distributionen.

Schau mal folgende Threads durch:
http://groups.google.com/groups?q=dateien%20umbenennen%20mmv

Du bist bist nicht der erste mit diesem Problem, dort wirst Du fast schon von Lösungen dafür erschlagen.
The purpose of computing is insight, not numbers.
Richard Hamming, 1962

Arne

ThI

  • "Arne" is male

Posts: 1,798

Date of registration: Oct 7th 2002

Location: Hannover :)

Occupation: Lecturer ThI

8

Thursday, April 1st 2004, 10:26pm

hab mir eben nen mini skript ausgedacht was auch geht

Source code

1
for i in *.sdc; do mv $i $(echo $i|sed 's/.sdc/.sdcopen/');done


edit: lol sehe gerade, dass du ja quasi das selbe da stehen hast ;)
"NP - The class of dashed hopes and idle dreams." Complexity Zoo

  • "Ernestinum[xic]" is male
  • "Ernestinum[xic]" started this thread

Posts: 83

Date of registration: Oct 15th 2003

Location: Hannover

Occupation: finde ich interessant!

9

Thursday, April 1st 2004, 10:29pm

mmv auf dem rechner leider nicht vorhanden :((( und inet anschluss hat das ding auch net
und will ungern an dem ding rumfummeln also zusätlich was raufschmeissen, das gerät
ist das Gerät für die CT-Bilddarstellungsberechnung!

  • "Ernestinum[xic]" is male
  • "Ernestinum[xic]" started this thread

Posts: 83

Date of registration: Oct 15th 2003

Location: Hannover

Occupation: finde ich interessant!

10

Thursday, April 1st 2004, 10:38pm

hmm bin wohl bissel zu blöd, bin noch linux neuling, was bedeutet denn die fehlermeldung
"variable synthax"! ist denn die variable i schon irgendwie als variable declariert oder wie läuft das in den bash scripten?
*wahrscheinlich erschlag werd*
:=)

Arne

ThI

  • "Arne" is male

Posts: 1,798

Date of registration: Oct 7th 2002

Location: Hannover :)

Occupation: Lecturer ThI

11

Thursday, April 1st 2004, 10:39pm

1. hast du meins eingegeben was ich da gepostet hab?
2. wenn nicht, poste mal was du eingegeben hast.
"NP - The class of dashed hopes and idle dreams." Complexity Zoo

  • "Ernestinum[xic]" is male
  • "Ernestinum[xic]" started this thread

Posts: 83

Date of registration: Oct 15th 2003

Location: Hannover

Occupation: finde ich interessant!

12

Thursday, April 1st 2004, 10:42pm

habe genau das was du dort gesagt hast eingegeben und das was oben steht die beiden sachen habe ich eingegeben udn kommthalt diese
fehlermeldung!
das doofe ist dass ich die dateien zu hause umbenannt habe in *.sdcopen, jedoch
zeigt er mir an *.sdc* und ich weiss nicht wo der 2. stern herkommt. ist der name im zu lang
oder warum macht er am ende nen stern? der name ist 14 zeichen lang!