Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[OT + BASH] binäre Dateien [solved]
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
pablo_supertux
Advocate
Advocate


Joined: 25 Jan 2004
Posts: 2953
Location: Somewhere between reality and Middle-Earth and in Freiburg (Germany)

PostPosted: Mon Oct 24, 2005 10:00 pm    Post subject: [OT + BASH] binäre Dateien [solved] Reply with quote

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
View user's profile Send private message
Finswimmer
Bodhisattva
Bodhisattva


Joined: 02 Sep 2004
Posts: 5467
Location: Langen (Hessen), Germany

PostPosted: Mon Oct 24, 2005 10:17 pm    Post subject: Reply with quote

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
View user's profile Send private message
pablo_supertux
Advocate
Advocate


Joined: 25 Jan 2004
Posts: 2953
Location: Somewhere between reality and Middle-Earth and in Freiburg (Germany)

PostPosted: Mon Oct 24, 2005 11:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
slick
Bodhisattva
Bodhisattva


Joined: 20 Apr 2003
Posts: 3495

PostPosted: Tue Oct 25, 2005 9:54 am    Post subject: Reply with quote

pablo_supertux wrote:
danke, das ist genau was ich gesucht habe

Dann bitte Thread auf solved setzen.
Back to top
View user's profile Send private message
pablo_supertux
Advocate
Advocate


Joined: 25 Jan 2004
Posts: 2953
Location: Somewhere between reality and Middle-Earth and in Freiburg (Germany)

PostPosted: Tue Oct 25, 2005 2:48 pm    Post subject: Reply with quote

slick wrote:
pablo_supertux wrote:
danke, das ist genau was ich gesucht habe

Dann bitte Thread auf solved setzen.


stimmt, hab's vergessen (Uhrzeit) :)
_________________
A! Elbereth Gilthoniel!
silivren penna míriel
o menel aglar elenath,
Gilthoniel, A! Elbereth!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum