2021年4月2日星期五

bash script not executing

Anyways I'm new to web development and I am trying to use and understand the command line more. I keep having to kill a process running on port 3000 because every time I try to restart it, it says "in use". So I kept having to write the same 2 lines on the command line to kill it and I decided I wanted to use a executable bash script instead so it would save time. I made the bash script but I don't know what's wrong with it.

#!/usr/bin/bash  x = sudo lsof -t -i:3000  sudo kill ${x}   echo "Complete"  

That's the script and the error is saying line 3 command not found. Thanks for your help!

https://stackoverflow.com/questions/66927058/bash-script-not-executing April 03, 2021 at 09:47AM

没有评论:

发表评论