Sponsored Content
Full Discussion: Stopping a shell script
Top Forums UNIX for Dummies Questions & Answers Stopping a shell script Post 302153734 by bhargav on Wednesday 26th of December 2007 11:57:02 AM
Old 12-26-2007
use 'return'
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Stopping a print request

Im running a solaris 9 system and keep getting this message: Request to LXKF894CB (unknown printer) from zion. This happen because there was a mis configured printer and a job was submitted to it. I fix the printer issue but this message keeps repeating and the PID keeps going up. How can i... (5 Replies)
Discussion started by: meyersp
5 Replies

2. Shell Programming and Scripting

stopping a script

i want to stop a script from running after one minute, using the sleep command, and then kill the process. anyhelp with this. (2 Replies)
Discussion started by: AtomJ22
2 Replies

3. UNIX for Advanced & Expert Users

stopping a processor

hi, Can any plz tell what is the command for stopping a processor? suppose a system is accessing 10 processors and we want to stop the 3rd & 6th processor then whats the command in Unix? thank u (2 Replies)
Discussion started by: nm_virtual
2 Replies

4. Shell Programming and Scripting

Stopping a command in between

Hi Is it possible to stop a command executing after certain time? I have this command say prstat which keeps on giving the values etc of the processes after every 1 sec(refreshes the screen) What I want is just stop the execution after first screen Since I have written this command in shell... (3 Replies)
Discussion started by: superprg
3 Replies

5. Shell Programming and Scripting

Stopping A process

Hi I want to stop a process using a shell script. how do i do that? ie, to simulate ps -ef|grep Process name get the process id and kill -9 process id plz help... (4 Replies)
Discussion started by: gopsman
4 Replies

6. UNIX Desktop Questions & Answers

stopping running process

hi all, I am using red hat AS 4 linux enterprise,i need to run my application such that while its running no other process shuld run all the remaining process should be suspended ,i need to use whole of the process only for that application to run ,can anyone suggest me how to do this. ... (3 Replies)
Discussion started by: srilakshmi
3 Replies

7. Red Hat

stopping you have mail.....

Hi, on server Red Hat Enterprise Linux AS release 3, I am getting the mail "you have mail" can any body suggest how to stop this? mail are getting generated in below path. /var/spool/postfix/maildrop, due to which heavy file are getting generated. though sendmail service is stopped. ... (0 Replies)
Discussion started by: manoj.solaris
0 Replies

8. Shell Programming and Scripting

Stopping cron job

Hi, I have scheduled one job in crontab. I want to stop the job automatically after some time of its execution without killing it. Could i archive the above? (8 Replies)
Discussion started by: mehulleo
8 Replies

9. Windows & DOS: Issues & Discussions

Stopping Windows 10 Clients?

As I know you are all aware Windows 10 poses some serious security concerns. My question is three fold. 1. Is there a way to stop Windows 10 clients from accessing a web server? 2. What would be the MS counter punch to that? ie: how would they circumvent. (mask browser credentials?) 3. Is... (4 Replies)
Discussion started by: ScottyPC
4 Replies
point(2rheolef) 						    rheolef-6.1 						   point(2rheolef)

NAME
point - vertex of a mesh DESCRIPTION
Defines geometrical vertex as an array of coordinates. This array is also used as a vector of the three dimensional physical space. IMPLEMENTATION
template <class T> class point_basic { public: // typedefs: typedef size_t size_type; typedef T float_type; // allocators: explicit point_basic () { _x[0] = T(); _x[1] = T(); _x[2] = T(); } explicit point_basic ( const T& x0, const T& x1 = 0, const T& x2 = 0) { _x[0] = x0; _x[1] = x1; _x[2] = x2; } template <class T1> point_basic<T>(const point_basic<T1>& p) { _x[0] = p._x[0]; _x[1] = p._x[1]; _x[2] = p._x[2]; } template <class T1> point_basic<T>& operator = (const point_basic<T1>& p) { _x[0] = p._x[0]; _x[1] = p._x[1]; _x[2] = p._x[2]; return *this; } // accessors: T& operator[](int i_coord) { return _x[i_coord%3]; } const T& operator[](int i_coord) const { return _x[i_coord%3]; } T& operator()(int i_coord) { return _x[i_coord%3]; } const T& operator()(int i_coord) const { return _x[i_coord%3]; } // interface for CGAL library inter-operability: const T& x() const { return _x[0]; } const T& y() const { return _x[1]; } const T& z() const { return _x[2]; } T& x(){ return _x[0]; } T& y(){ return _x[1]; } T& z(){ return _x[2]; } // inputs/outputs: std::istream& get (std::istream& s, int d = 3) { switch (d) { case 0 : _x[0] = _x[1] = _x[2] = 0; return s; case 1 : _x[1] = _x[2] = 0; return s >> _x[0]; case 2 : _x[2] = 0; return s >> _x[0] >> _x[1]; default: return s >> _x[0] >> _x[1] >> _x[2]; } } // output std::ostream& put (std::ostream& s, int d = 3) const; // algebra: bool operator== (const point_basic<T>& v) const { return _x[0] == v[0] && _x[1] == v[1] && _x[2] == v[2]; } bool operator!= (const point_basic<T>& v) const { return !operator==(v); } point_basic<T>& operator+= (const point_basic<T>& v) { _x[0] += v[0]; _x[1] += v[1]; _x[2] += v[2]; return *this; } point_basic<T>& operator-= (const point_basic<T>& v) { _x[0] -= v[0]; _x[1] -= v[1]; _x[2] -= v[2]; return *this; } point_basic<T>& operator*= (const T& a) { _x[0] *= a; _x[1] *= a; _x[2] *= a; return *this; } point_basic<T>& operator/= (const T& a) { _x[0] /= a; _x[1] /= a; _x[2] /= a; return *this; } point_basic<T> operator+ (const point_basic<T>& v) const { return point_basic<T> (_x[0]+v[0], _x[1]+v[1], _x[2]+v[2]); } point_basic<T> operator- () const { return point_basic<T> (-_x[0], -_x[1], -_x[2]); } point_basic<T> operator- (const point_basic<T>& v) const { return point_basic<T> (_x[0]-v[0], _x[1]-v[1], _x[2]-v[2]); } point_basic<T> operator* (T a) const { return point_basic<T> (a*_x[0], a*_x[1], a*_x[2]); } point_basic<T> operator* (int a) const { return operator* (a); } point_basic<T> operator/ (const T& a) const { return operator* (T(1)/T(a)); } point_basic<T> operator/ (point_basic<T> v) const { return point_basic<T> (_x[0]/v[0], _x[1]/v[1], _x[2]/v[2]); } // data: // protected: T _x[3]; // internal: static T _my_abs(const T& x) { return (x > T(0)) ? x : -x; } }; typedef point_basic<Float> point; // algebra: template<class T> inline point_basic<T> operator* (int a, const point_basic<T>& u) { return u.operator* (a); } template<class T> inline point_basic<T> operator* (const T& a, const point_basic<T>& u) { return u.operator* (a); } template<class T> inline point_basic<T> vect (const point_basic<T>& v, const point_basic<T>& w) { return point_basic<T> ( v[1]*w[2]-v[2]*w[1], v[2]*w[0]-v[0]*w[2], v[0]*w[1]-v[1]*w[0]); } // metrics: template<class T> inline T dot (const point_basic<T>& x, const point_basic<T>& y) { return x[0]*y[0]+x[1]*y[1]+x[2]*y[2]; } template<class T> inline T norm2 (const point_basic<T>& x) { return dot(x,x); } template<class T> inline T norm (const point_basic<T>& x) { return sqrt(norm2(x)); } template<class T> inline T dist2 (const point_basic<T>& x, const point_basic<T>& y) { return norm2(x-y); } template<class T> inline T dist (const point_basic<T>& x, const point_basic<T>& y) { return norm(x-y); } template<class T> inline T dist_infty (const point_basic<T>& x, const point_basic<T>& y) { return max(point_basic<T>::_my_abs(x[0]-y[0]), max(point_basic<T>::_my_abs(x[1]-y[1]), point_basic<T>::_my_abs(x[2]-y[2]))); } template <class T> T vect2d (const point_basic<T>& v, const point_basic<T>& w); template <class T> T mixt (const point_basic<T>& u, const point_basic<T>& v, const point_basic<T>& w); // robust(exact) floating point predicates: return the sign of the value as (0, > 0, < 0) // formally: orient2d(a,b,x) = vect2d(a-x,b-x) template <class T> int sign_orient2d ( const point_basic<T>& a, const point_basic<T>& b, const point_basic<T>& c); template <class T> int sign_orient3d ( const point_basic<T>& a, const point_basic<T>& b, const point_basic<T>& c, const point_basic<T>& d); // compute also the value: template <class T> T orient2d( const point_basic<T>& a, const point_basic<T>& b, const point_basic<T>& c); // formally: orient3d(a,b,c,x) = mixt3d(a-x,b-x,c-x) template <class T> T orient3d( const point_basic<T>& a, const point_basic<T>& b, const point_basic<T>& c, const point_basic<T>& d); template <class T> std::string ptos (const point_basic<T>& x, int d = 3); // ccomparators: lexicographic order template<class T, size_t d> bool lexicographically_less (const point_basic<T>& a, const point_basic<T>& b) { for (typename point_basic<T>::size_type i = 0; i < d; i++) { if (a[i] < b[i]) return true; if (a[i] > b[i]) return false; } return false; // equality } rheolef-6.1 rheolef-6.1 point(2rheolef)
All times are GMT -4. The time now is 01:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy