Home > database >  How to convert my .bat script to a .sh script
How to convert my .bat script to a .sh script

Time:11-19

I have a Discord bot that im currently using and want to have it constantly online by using a Pi4 I wasn't using however I'm unsure how to convert my .bat script into .sh as I have barely used linux. I have looked at another question on here but the code won't even boot to terminal.

The .bat file:

echo off
color 1
cls
:a
node index.js
goto a

I know I need to put #!/bin/sh into the top of the script but other than that I'm at a loss.

CodePudding user response:

#!/bin/sh
clear
while true; do
   node index.js
done
  • Related