![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Aite Group Finds Huge Gains for CEP | iBot | Complex Event Processing RSS News | 0 | 02-06-2008 08:50 AM |
| Survey finds Windows losing ground with developers - Computerworld New Zealand | iBot | UNIX and Linux RSS News | 0 | 07-09-2007 04:40 AM |
| SETI Finds Stolen Laptop | Perderabo | News, Links, Events and Announcements | 2 | 04-05-2007 07:14 PM |
| fixing the error message when grep doesn't finds the pattern. | silver123 | UNIX for Dummies Questions & Answers | 1 | 03-03-2006 02:59 AM |
| Appending to filename a string of text grep finds | HLee1981 | Shell Programming and Scripting | 3 | 09-06-2005 11:44 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#8
|
|||
|
|||
|
The script you wrote is very similar to mine, isnt'it?
|
| Forum Sponsor | ||
|
|
|
#9
|
||||
|
||||
|
Yep, I lost a closing quote. Typo.
It is similar to the original script you posted, except that instead of piping the line count to "read", I just assign it directly to a variable -- this is a cleaner and more direct method of doing it. I also eliminated the "grep -v grep" with a little shell trickery -- the [s]quare brackets on the first letter of the script name. Its a personal preference, but I like this method better. |
|
#10
|
|||
|
|||
|
Thanks for your reply, but I have tested your code and my code 100 times (with a "for" writing to a log) and your code has failed 74 times and my code 63.
My question is why fails it? Thanks in advance. |
|
#11
|
||||
|
||||
|
I recommend saving the output of your ps command (without the 'wc -l') to a log file so that you can see why it is failing.
|
||||
| Google The UNIX and Linux Forums |