Eli näin illan ajankuluksi aloin miettiä skriptiä joka mahdollisimman vähällä vaivalla kirjoittaa sanoitukset kappaleeseen 99 bottles kappaleeseen.
tallenna tiedosto jollain nimellä ja aseta päätteeksi .bat ja suorita se
skripti luo sanoitukset tallennuskansioon nimellä 99_bottles.txt
Kehitin tälläisen:
@echo off
set /a num=99
echo Lyrics of the song 99 Bottles of Beer >> 99_bottles.txt
echo. >> 99_bottles.txt
:a
if %num%==1 goto b
echo %num% bottles of beer on the wall, %num% bottles of beer. >> 99_bottles.txt
set /a num=%num% -1
echo Take one down and pass it around, %num% bottles of beer on the wall. >> 99_bottles.txt
echo. >> 99_bottles.txt
goto a
:b
echo 1 bottle of beer on the wall, 1 bottle of beer.
echo Take one down and pass it around, no more bottles of beer on the wall. >> 99_bottles.txt
exit
tallenna tiedosto jollain nimellä ja aseta päätteeksi .bat ja suorita se
skripti luo sanoitukset tallennuskansioon nimellä 99_bottles.txt
Kehitin tälläisen:
@echo off
set /a num=99
echo Lyrics of the song 99 Bottles of Beer >> 99_bottles.txt
echo. >> 99_bottles.txt
:a
if %num%==1 goto b
echo %num% bottles of beer on the wall, %num% bottles of beer. >> 99_bottles.txt
set /a num=%num% -1
echo Take one down and pass it around, %num% bottles of beer on the wall. >> 99_bottles.txt
echo. >> 99_bottles.txt
goto a
:b
echo 1 bottle of beer on the wall, 1 bottle of beer.
echo Take one down and pass it around, no more bottles of beer on the wall. >> 99_bottles.txt
exit
Vastaukset
Vanhimmat
Ei vielä vastauksia
Aloittaja odottaa vastauksia. Kerro oma näkemyksesi ensimmäisenä.