Sponsored Content
Top Forums Shell Programming and Scripting how can i check in csh if command found or not found ? Post 302108273 by matrixmadhan on Sunday 25th of February 2007 11:24:54 PM
Old 02-26-2007
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

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sh: Hello: command not found

Hi All, I got this below, sudo ./myvar sh-3.1 # Hello You sh: Hello: command not found sh-3.1# sh-3.1# sh-3.1# exit Hi there Hi there $myvar $myvar Enter some text Hello World $myvar now equals Hello World for this code, (2 Replies)
Discussion started by: coolboarderguy
2 Replies

2. UNIX for Dummies Questions & Answers

Command not found

I ran the following script and it saying that sqlplus command not found. Please give me suggestions. echo `date +%c` >> $LOG_FILE echo "Database BACKUP starting." >> $LOG_FILE ORACLE_HOME=/u01/app/oracle/product/10.2; export ORACLE_HOME ORACLE_SID=SEED; export ORACLE_SID... (20 Replies)
Discussion started by: manna
20 Replies

3. Shell Programming and Scripting

Menu list in Unix csh - command not found

Hello, im taking a class of Unix and i dont really know much about it, im trying to create a list of menu a user would select from and im very lost. Basically it will have 5 options, the user will chose from: 1. list files in the pwd 2. display date and time 3. is the file file or directory 4.... (5 Replies)
Discussion started by: morava
5 Replies

4. Shell Programming and Scripting

Always getting command not found

I'm using Terminal in MAC OS X, and new to this. I don't know what happened to the path. I always get "command not found". For example, this is some of what I get: -bash: ls: command not found -bash: touch: command not found What should I do to return the terminal to normal? ... (0 Replies)
Discussion started by: Abder-Rahman
0 Replies

5. UNIX for Dummies Questions & Answers

csh command not found

I get a "command not found" error when I run the csh command. I also get this error when I start a new session since my default shell is c shell. Any pointers as to what is going on? I am trying to set some paths using the .cshrc file and need to use the csh command for this. Thanks. (1 Reply)
Discussion started by: kannyg
1 Replies

6. Shell Programming and Scripting

Command not found errors when running csh script

I am trying to find the number of files whose name starts with uni. Below is the code but it is giving error. :confused: #!/bin/csh FILES_NAME ='files_list'; FILE_NAME_PATTERN = 'uni*'; NO_OF_FILES; ls -l $FILE_NAME_PATTERN > $FILES_NAME ; NO_OF_FILES = `wc -l $FILES_NAME`; echo... (3 Replies)
Discussion started by: hiten.r.chauhan
3 Replies

7. Shell Programming and Scripting

UNIX--Check Process not found error

hi guys can you please help me i have the following script to load to a database but when i execute it...its saying Check_Process: not found #!/bin/ksh ##-To load Oracle user profile ##./monitor_io.ksh ##./test.ksh SCP_DIR=/export/home/yani_m/scripts ... (9 Replies)
Discussion started by: LucyYani
9 Replies

8. Shell Programming and Scripting

C command not found

Dear All, I am trying to install a program in Opensuse linux and while issuing the 'make' command, its showing me an error /bin/sh: C: command not found Kindly help me to troubleshoot the problem. I have gcc, c++ all install in the linux machine. Thanks (9 Replies)
Discussion started by: biochemist
9 Replies

9. Shell Programming and Scripting

Check if files inside a text file are found under a directory

Hi all, Please somebody help me with this: I want to check if the files listed in a text file, are found under a directory or not. For example: the file is list_of_files.txt, which contains inside this rows: # cat list_of_files logs errors paths debug # I want to check if these... (3 Replies)
Discussion started by: arrals_vl
3 Replies

10. Shell Programming and Scripting

Check file if not found send mail if exit call second script

I need to check my script and change to working mode. currently it was not sending the mail and exit without calling the second script. I need to check the file is present ="/home/Rvtools/test.csv" if this file not found after the time retry send mail file not found If the file exit run the... (2 Replies)
Discussion started by: ranjancom2000
2 Replies
SLEEP(1)						    BSD General Commands Manual 						  SLEEP(1)

NAME
sleep -- suspend execution for an interval of time SYNOPSIS
sleep seconds DESCRIPTION
The sleep command suspends execution for a minimum of seconds. If the sleep command receives a signal, it takes the standard action. IMPLEMENTATION NOTES
The SIGALRM signal is not handled specially by this implementation. The sleep command will accept and honor a non-integer number of specified seconds (with a '.' character as a decimal point). This is a non- portable extension, and its use will nearly guarantee that a shell script will not execute properly on another system. EXAMPLES
To schedule the execution of a command for x number seconds later (with csh(1)): (sleep 1800; sh command_file >& errors)& This incantation would wait a half hour before running the script command_file. (See the at(1) utility.) To reiteratively run a command (with the csh(1)): while (1) if (! -r zzz.rawdata) then sleep 300 else foreach i (`ls *.rawdata`) sleep 70 awk -f collapse_data $i >> results end break endif end The scenario for a script such as this might be: a program currently running is taking longer than expected to process a series of files, and it would be nice to have another program start processing the files created by the first program as soon as it is finished (when zzz.rawdata is created). The script checks every five minutes for the file zzz.rawdata, when the file is found, then another portion processing is done courteously by sleeping for 70 seconds in between each awk job. DIAGNOSTICS
The sleep utility exits 0 on success, and >0 if an error occurs. SEE ALSO
nanosleep(2), sleep(3) STANDARDS
The sleep command is expected to be IEEE Std 1003.2 (``POSIX.2'') compatible. HISTORY
A sleep command appeared in Version 4 AT&T UNIX. BSD
April 18, 1994 BSD
All times are GMT -4. The time now is 04:11 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy