Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I put the script into .bash_profile which runs a process when uses login to that account, the problem is when login again, the process will run again and cause the crash, how could I put the condition to check whether the process has been run, if it is run, no need to call it.
Distribution: RedHat, Slackware, Experimenting with FreeBSD
Posts: 222
Rep:
You would use an 'if'statement to check the $? variable. If the last command was successful you will receive a value of 0. If you want specifics on what to do, you'll have to provide more information.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.