LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-03-2013, 01:10 PM   #1
Sanpreet Singh
Member
 
Registered: Jan 2013
Location: Malout,Punjab
Distribution: Ubuntu(Debian),
Posts: 40
Blog Entries: 1

Rep: Reputation: Disabled
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.
 
Old 07-03-2013, 02:04 PM   #2
jazz5150
LQ Newbie
 
Registered: Jun 2013
Location: NL
Distribution: Kali-Linux, Debian
Posts: 20

Rep: Reputation: 15
Code:
exit
Will end a bash script.

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

Cheers
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SSH connection from BASH script stops further BASH script commands tardis1 Linux - Newbie 3 12-06-2010 09:56 AM
Bash Script only works when manually running. rivacom Linux - General 6 10-13-2010 09:18 AM
How do I use CTRL+D signal in bash script manya Programming 1 01-15-2010 08:10 AM
Bash script stop CTRL+C stopping joshiggins Linux - Software 2 06-12-2008 04:45 AM
bash script to read CTRL+D panchosansa Programming 5 10-26-2006 04:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration