PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : dialog: menu zum dateien löschen



thenktor
25-03-2004, 15:29
hallo
ich möchte mit dialog den inhalt eines ordners darstellen und mit der checklist option auswählen welche dateien gelöscht werden sollen.
hab leider keine guten beispiele gefunden, kann mir vielleicht jemand einen tip geben?

Hans-Georg Normann
25-03-2004, 19:44
Hilft dir das weiter? http://www.linuxfocus.org/Deutsch/November2002/article267.shtml#267lfindex1

Hans

thenktor
26-03-2004, 06:50
danke, da gabs was in der richtung. das hab ich jetzt mal soweit verändert:

find $dirs -maxdepth 1 -type f -printf "\"%p\" size=%kK off " > FILES
dialog --title "$pack.tar.gz" --checklist "tick the files which should be included into the package $pack.tar.gz" 18 60 8 `cat FILES` 2> $tempfile

allerdings will's einfach noch nicht funktionieren.
ich denke es liegt daran dass es nur funktioniert wenn in %p (dateinamen) keine leerzeichen sind. die anführungszeichen sind anscheinend nutzlos.
in FILES steht das:
"band/acoustic guitar rock lyrics.txt" size=20K off "band/wunschliste classic rock" size=4K off "band/wunschliste modern rock" size=4K off

wenn ich das ausführe gehts aber:
find band -maxdepth 1 -type f -printf "\"%p\" size=%kK off " > FILES
cat FILES
(und jetzt die ausgabe von cat manuell an die dialog zeile kopiert)
dialog --title "$pack.tar.gz" --checklist "tick the files which should be included into the package $pack.tar.gz" 18 60 8 "band/acoustic guitar rock lyrics.txt" size=20K off "band/wunschliste classic rock" size=4K off "band/wunschliste modern rock" size=4K off