View previous topic :: View next topic |
Author |
Message |
pablo_supertux Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/gallery/Mario/Mario_-_Yoshi2.gif)
Joined: 25 Jan 2004 Posts: 2953 Location: Somewhere between reality and Middle-Earth and in Freiburg (Germany)
|
Posted: Mon Oct 24, 2005 10:00 pm Post subject: [OT + BASH] binäre Dateien [solved] |
|
|
Hi
ich hab in einem Skript folgendes:
Code: |
FILE_LIST="`find $LOG_ADM`"
for i in $FILE_LIST ; do
# ignore directories and files doe cannot read
if [ ! -d "$i" ] && [ -r "$i" ] ; then
md5sum "$i" >> $MD5_LOG_FILE$1
fi
done
|
das Problem ist, dass im Verzeichnis $LOG_ADM einige binäre Dateien (nicht ausführbare) enthalten sind, die ich aber nicht in $MD5_LOG_FILE$1 haben will. Wie kann ich am besten herausfinden, ob eine Datei nur plain text oder binäre Daten hat?
PS: doe ist ein Benutzer _________________ A! Elbereth Gilthoniel!
silivren penna míriel
o menel aglar elenath,
Gilthoniel, A! Elbereth!
Last edited by pablo_supertux on Tue Oct 25, 2005 2:48 pm; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Finswimmer Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/1672586922424daf205ec26.jpg)
Joined: 02 Sep 2004 Posts: 5467 Location: Langen (Hessen), Germany
|
Posted: Mon Oct 24, 2005 10:17 pm Post subject: |
|
|
Was ist mit einem: file $i ?
Und dann fängst du mit If schleifen ab, ob es ASCII Code, Binary oder sonstwas ist?
Bzw. andersrum, du lässt nur plain text durch.
Tobi |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
pablo_supertux Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/gallery/Mario/Mario_-_Yoshi2.gif)
Joined: 25 Jan 2004 Posts: 2953 Location: Somewhere between reality and Middle-Earth and in Freiburg (Germany)
|
Posted: Mon Oct 24, 2005 11:56 pm Post subject: |
|
|
danke, das ist genau was ich gesucht habe _________________ A! Elbereth Gilthoniel!
silivren penna míriel
o menel aglar elenath,
Gilthoniel, A! Elbereth! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
slick Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/155298905545589d9986ab5.gif)
Joined: 20 Apr 2003 Posts: 3495
|
Posted: Tue Oct 25, 2005 9:54 am Post subject: |
|
|
pablo_supertux wrote: | danke, das ist genau was ich gesucht habe |
Dann bitte Thread auf solved setzen. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
pablo_supertux Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/gallery/Mario/Mario_-_Yoshi2.gif)
Joined: 25 Jan 2004 Posts: 2953 Location: Somewhere between reality and Middle-Earth and in Freiburg (Germany)
|
Posted: Tue Oct 25, 2005 2:48 pm Post subject: |
|
|
slick wrote: | pablo_supertux wrote: | danke, das ist genau was ich gesucht habe |
Dann bitte Thread auf solved setzen. |
stimmt, hab's vergessen (Uhrzeit) ![Smile :)](images/smiles/icon_smile.gif) _________________ A! Elbereth Gilthoniel!
silivren penna míriel
o menel aglar elenath,
Gilthoniel, A! Elbereth! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|