Thread Multiple Files in Shell testen? (19 answers)
Opened by kami at 2010-03-22 07:47

roli
 2010-03-22 12:24
#135137 #135137
User since
2004-12-31
424 Artikel
BenutzerIn
[default_avatar]
Du könntest z.B.:
Code: (dl )
1
2
3
4
5
6
7
8
9
for datei in *
do
typ=$(file $datei|cut -d":" -f2)
if [ $typ = " ASCII text" ]
echo "$datei ist eine Textdatei"
else
echo "$datei ist KEINE Textdatei"
fi
done

verwenden.
Roland
--
"Steh vorn, während du fragst;
sitzen soll, wer antwortet."
Aus "Die Edda des Snorri Sturluson" "Gylfis Täuschung" Strophe 2

View full thread Multiple Files in Shell testen?