![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Command not found | BigTool4u2 | UNIX for Dummies Questions & Answers | 2 | 03-07-2008 10:40 PM |
| cc command not found | mishra_sk_in | UNIX for Dummies Questions & Answers | 4 | 08-14-2007 02:00 AM |
| command not found | simba_tsavo | UNIX for Advanced & Expert Users | 1 | 07-05-2006 06:17 AM |
| sh: Hello: command not found | coolboarderguy | Shell Programming and Scripting | 2 | 06-24-2006 01:27 AM |
| xlf: command not found!!!! | mzzt | AIX | 2 | 01-05-2006 01:19 PM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
how can i check in csh if command found or not found ?
hello all
im trying to use in sun Solaris the information received from the top command now i several machines that dont have install the top program so when im running the script im geting error saying after im running this code : Code:
set MemoryInfo = `top | grep Memory`
if ( $status != 1 ) then
echo $MemoryInfo
endif
top: Command not found
|
| Forum Sponsor | ||
|
|
|
|||
|
usually top would be available at /usr/bin/top ( If you are sure, there is no top available, you can leave it )
to supress any error, if you are sure you dont need them for debugging purpose then Code:
anycommand 2>/dev/null |
|
||||
|
Don't use [t]csh for scripting.
http://www.grymoire.com/Unix/CshTop10.txt http://www.grymoire.com/Unix/Csh.html#uh-0 http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/ Last edited by cfajohnson; 03-04-2007 at 04:04 PM. Reason: typo: s/or/for/ |
||||
| Google UNIX.COM |