Skal have lavet en .sh fil der automatisk tæller op til 80 filer og begynder forfra har allerede denne fil her
#!/bin/bash
count=1
while true
do
echo("mv /Lobby/Skyblock/Minecraft/plugins/IslandWorld/schematics/" . count . ".schematic /Lobby/Skyblock/Minecraft/plugins/IslandWorld/schematics/normal.schematic)
if (count == 80){
count=0
}
count=$((count+1))
done
Men får en fejl når jeg prøver at køre den.
Her er fejlen
./randomisland.sh: line 5: syntax error near unexpected token `"mv /Lobby/Skyblock/Minecraft/plugins/IslandWorld/schematics/"'
./randomisland.sh: line 5: ` echo("mv /Lobby/Skyblock/Minecraft/plugins/IslandWorld/schematics/" . count . ".schematic /Lobby/Skyblock/Minecraft/plugins/IslandWorld/schematics/normal.schematic) '
Håber i kan hjælpe mig med mit problem
11-01-2004
Prøv følgende i stedet (ikke testet):
#!/bin/bash
count=1
while true; do
echo "mv /Lobby/Skyblock/Minecraft/plugins/IslandWorld/schematics/${count}.schematic /Lobby/Skyblock/Minecraft/plugins/IslandWorld/schematics/normal.schematic"
if [ $count -eq 80 ]; then
count=0
fi
count=$((count+1))
done
13-04-2014
#1.
Men kan man gøre det den tager lad os sige 10 sec om at skifte til den næste? :)
22-10-2004
#2:
Mener du som:
sleep 10
Mere her: http://en.wikipedia.org/wiki/Sleep_(Unix)