js on Nostr: ` #!/bin/ksh #there is no free will #money isn't real function coin_flip { ...
`
#!/bin/ksh
#there is no free will
#money isn't real
function coin_flip {
flip=$((RANDOM%2))
}
function purchase {
print "$1" >> ~/inventory.txt
}
function visit_fleamarket {
cd /usr/local/share/prague
for i in $(cat old_stuff.txt); do
coin_flip
if (( flip == 1 )); then
purchase "$i"
fi
done
}
function buy_stuff {
visit_fleamarket
}
buy_stuff
return 0
`
#!/bin/ksh
#there is no free will
#money isn't real
function coin_flip {
flip=$((RANDOM%2))
}
function purchase {
print "$1" >> ~/inventory.txt
}
function visit_fleamarket {
cd /usr/local/share/prague
for i in $(cat old_stuff.txt); do
coin_flip
if (( flip == 1 )); then
purchase "$i"
fi
done
}
function buy_stuff {
visit_fleamarket
}
buy_stuff
return 0
`