Ich habe das Verständnis, dass die Verwendung von "/../" in einem Dateispeicherort in bash eine Ebene höher gehen wird. Das ist, was ich versuche, hier zu tun:Warum läuft mein Skript bei der Verwendung von /../ nicht auf einer Ebene?
for box in {0..4}
do
for lvl in {0..24}
do
key="UNLOCKED_${box}_$lvl"
plutil -key "$key" -value '1' "$appdir/../Library/Preferences/com.chillingo.cuttherope.plist" 2>&1> /dev/null
#successCheck=$(plutil -key "$key" "/$appdir/../Library/Preferences/com.chillingo.cuttherope.plist")
#if [ "$successCheck" -lt 1 ]; then
# echo "Level ${box}-$lvl failed! "
#fi
done
done
Aber ich erhalte diesen Fehler (x125):
Error: File not found at path /var/mobile/Applications/1E17CC78-AA6E-4FFA-B241-74A73FE3AB0E/CutTheRope.app/../Library/Preferences/com.chillingo.cuttherope.plist
Jede Hilfe wäre sehr geschätzt/ Dank.
Also würde ich "$ {appdir} ../ Library/Preferences/plistname.plist" tun? –
Ja :) Sie haben Recht. Ich denke ... Es könnte einfach einfacher sein, das .. obwohl zu entfernen. – jmort253
Wenn ich $ {appdir} ../ Library/Preferences/plistname.plist mache, bekomme ich: Fehler: Datei nicht im Pfad /var/mobile/Applications/1E17CC78-AA6E-4FFA-B241-74A73FE3AB0E/CutTheRope.app gefunden. ./Library/Preferences/com.chillingo.cuttherope.plist –