10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I have a Makefile that converts wrl (vrml) files to html files...
how can I use a shell script in that makefile which works on all html files after converting?
The Shell Script have to find and replace a String in every createt html file.
sorry I'm a Newbie, so I hope someone can... (0 Replies)
Discussion started by: Dan_78
0 Replies
2. Shell Programming and Scripting
I want to run a target defined in a shell script. The shell script name is 'ua.sc' and the target in it is 'N' i.e. (ua N) throught a makefile. How can i do it so that i can run it with a make target. (3 Replies)
Discussion started by: vineet.dhingra
3 Replies
3. Shell Programming and Scripting
I'm writing a VERY simple shell script. I need to call a makefile in a subdirectory. What's the command I need to use?
./dir/make and ./dir/makefile doesn't work.
Thanks in advance (1 Reply)
Discussion started by: yamahabob
1 Replies
4. Shell Programming and Scripting
Hi,
I have a bash script which calls a few "make". I would like to know whether the makefile failed with any errors. How do I do that in the script?
Thanks,
S (2 Replies)
Discussion started by: suryaemlinux
2 Replies
5. UNIX for Advanced & Expert Users
Hi, I'm trying to run the module load command in a Makefile and i'm getting the following error:
make: module: command not found
Why is this? Is there any way to run this command in a Makefile?
NOTE: command - module load msjava/sunjdk/1.5.0 works fine outside of the Makefile (2 Replies)
Discussion started by: hernandinho
2 Replies
6. Shell Programming and Scripting
Hi,
I have learned native compilation of basic c code example programs from the net.
The issue is, .c code file doesn't come with respective Makefile.
Visited some web sites with Makefile manuals but still can not master writing Makefile file to work.
The idea is to have intelligent shell... (5 Replies)
Discussion started by: darius2
5 Replies
7. Shell Programming and Scripting
hey, within a shell script file I know how to turn on tracing using "-x"
#!/bin/bash -x
now I have a complicated makefile which contains lots of `command`, and i would like to trace these `command`, where shall i put the option "-x"?
thanks! (1 Reply)
Discussion started by: patiobarbecue
1 Replies
8. Shell Programming and Scripting
Is there a way to write a makefile for all the source files in a directory with a shell script? (2 Replies)
Discussion started by: zzhan
2 Replies
9. Shell Programming and Scripting
Hi,
Can we execute a shell script by makefile.
I mean we will write a shell script in a make file and it will be executed when we compile the C++ program using make file. (2 Replies)
Discussion started by: surjyap
2 Replies
10. Shell Programming and Scripting
Collegues
I have an AWK script like the following.
{
if ($2 ~ /JJ/ && $4 ~ /IN/)
{
print $2, $3, $4, $5
}
}
How can I embed it in a perl program.
Jaganadh.G (5 Replies)
Discussion started by: jaganadh
5 Replies
exit(1) User Commands exit(1)
NAME
exit, return, goto - shell built-in functions to enable the execution of the shell to advance beyond its sequence of steps
SYNOPSIS
sh
exit [n]
return [n]
csh
exit [ ( expr )]
goto label
ksh
*exit [n]
*return [n]
DESCRIPTION
sh
exit will cause the calling shell or shell script to exit with the exit status specified by n. If n is omitted the exit status is that of
the last command executed (an EOF will also cause the shell to exit.)
return causes a function to exit with the return value specified by n. If n is omitted, the return status is that of the last command exe-
cuted.
csh
exit will cause the calling shell or shell script to exit, either with the value of the status variable or with the value specified by the
expression expr.
The goto built-in uses a specified label as a search string amongst commands. The shell rewinds its input as much as possible and searches
for a line of the form label: possibly preceded by space or tab characters. Execution continues after the indicated line. It is an error to
jump to a label that occurs between a while or for built-in command and its corresponding end.
ksh
exit will cause the calling shell or shell script to exit with the exit status specified by n. The value will be the least significant 8
bits of the specified status. If n is omitted then the exit status is that of the last command executed. When exit occurs when executing
a trap, the last command refers to the command that executed before the trap was invoked. An end-of-file will also cause the shell to exit
except for a shell which has the ignoreeof option (See set below) turned on.
return causes a shell function or '.' script to return to the invoking script with the return status specified by n. The value will be the
least significant 8 bits of the specified status. If n is omitted then the return status is that of the last command executed. If return
is invoked while not in a function or a '.' script, then it is the same as an exit.
On this man page, ksh(1) commands that are preceded by one or two * (asterisks) are treated specially in the following ways:
1. Variable assignment lists preceding the command remain in effect when the command completes.
2. I/O redirections are processed after variable assignments.
3. Errors cause a script that contains them to abort.
4. Words, following a command preceded by ** that are in the format of a variable assignment, are expanded with the same rules as a vari-
able assignment. This means that tilde substitution is performed after the = sign and word splitting and file name generation are not
performed.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO
break(1), csh(1), ksh(1), sh(1), attributes(5)
SunOS 5.10 15 Apr 1994 exit(1)