answersLogoWhite

0


Best Answer

Errors can occur in a script - you can check the return status of any command to see if part of the script fails.

For scripts that are production ready they should always exit with some status, in case one script calls another. In that case you would need to check the status of the called script.

User Avatar

Wiki User

10y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you check an error in a UNIX script?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How can you protect zip file with password with the help of UNIX script?

A Unix script is not necessary. The zip utility has the capability of compressing the files with a password.


What is portablity in terms of unix?

Unix is inherently portable; this means that a program, script, or process may be moved from Unix system to Unix system with little effort or change (hence - portable).


What is a command in Unix?

Essentially, a command in Unix is a program that you execute for a certain purpose. It could be anything, from a shell script, to copying or deleting files, etc.


What is a parse error in php?

Parse error in PHP means that your script is invalid - it is not compliant with the programming language specification. After parse error script is no longer executed.


What job functions could you script in a UNIX or DOS shell script?

Actually, just about anything you want to do. Depends on the job function requirements.


Unix script to calculate average of n numbers given by user?

You really don't want to do this in a shell script - scripting languages in Unix typically do not handle or work with floating values, only integers. A better way would be to write a program to do this that works under Unix, such as a 'C" program. See the related link for an example


What is title is undefined?

Script error in modzilla


Write a shell script which deletes all line containing the word unix in the filesn suppiled as argument to this shell script?

# SS29 # Script to delete all lines containing the word 'unix' from files supplied as arguments # Usage: SS29 file1 file2 file3 ... if [$# -lt 2] then echo Insufficient arguments exit fi for file do grep -v unix $file>/temp/$file cp /temp/$file $file done


How do you check the flavor of unix?

uname -a


How do you check a file for spelling errors in unix?

Depending on the Unix vendor, there is usually a 'spell' or 'ispell' command available to spell check words in a file.


Code keeps appearing after hitting submit on the form to email in PHP are there any suggestions?

There must be an error in the PHP script. Your have to check it to see what's wrong.


Record your login session into a file in UNIX?

Use the 'script' command; it captures everything you are doing and stores it into a file.