Mathias Brodala: Variable im Bash Script prüfen

Beitrag lesen

Hallo Mathias.

das hatte ich wie folgt abgewandelt
if ["$testvariable" -eq "tar.gz" ]
dann erhalte ich jedoch folgende Fehlermeldung
./Scriptname.sh: line xy: [tar.gz: command not found

Nachtrag: -eq, -ne, -lt, -le, -gt, und -ge sind nur für Integerwerte gedacht.

Einen schönen Sonntag noch.

Gruß, Mathias

--
sh:( fo:} ch:? rl:( br: n4:~ ie:{ mo:| va:) de:> zu:} fl:( ss:) ls:[ js:|
„It is required that HTML be a common language between all platforms. This implies no device-specific markup, or anything which requires control over fonts or colors, for example. This is in keeping with the SGML ideal.“
[HTML Design Constraints: Logical Markup]