LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to end the bash script using commands in bash not manually by pressing ctrl+c (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-end-the-bash-script-using-commands-in-bash-not-manually-by-pressing-ctrl-c-4175468369/)

Sanpreet Singh 07-03-2013 12:10 PM

How to end the bash script using commands in bash not manually by pressing ctrl+c
 
I want to end the bash script when the file read by the bash Script is over. Actually I am making a project of automation of Universal Testing machine using Sensors. I have done the programming of it and I am Putting my code in the following link http://bit.ly/13s4WBu.

Now the problem is when I am running the script ttyUSB.sh it does not end automatically whent the break condition is applied to the ttyusb0 in arduino. To know more about arduino visit the following page http://en.wikipedia.org/wiki/Arduino

Now I need the help so that I can end the bash script automatically.

If you need more help then I can also give that.

jazz5150 07-03-2013 01:04 PM

Code:

exit
Will end a bash script.

Code:

exit $
Will end a bash script with the status of the last command.

Cheers


All times are GMT -5. The time now is 05:22 AM.