12-24-2014
This seems to me is referring to the historical
Thompson shell (Its successor Bourne Shell in UNIX v7 did not have a goto...)
1.
I think it means that you cannot use gotos if you use the shell interactively.
V6 Thompson Shell Port - Manuals - GOTO(1)
Presumably because there is a separate, external
goto command that needs to go look for the goto label, once invoked
2.
I would think that if the manual is explicit like that, only
: end would be allowed (
: being the first character on the line) with any number of spaces. The other label is maybe from another script, perhaps
sed ?
See also :
V6 Thompson Shell Port - Manuals - GOTO(1)
3.
Quote:
If such a line is found, goto repositions the command-file offset to the line after the label and exits
V6 Thompson Shell Port - Manuals - GOTO(1)
So it does seem that no commands will be processed on the line with the label.
Last edited by Scrutinizer; 12-24-2014 at 11:09 AM..
These 2 Users Gave Thanks to Scrutinizer For This Post:
9 More Discussions You Might Find Interesting
1. News, Links, Events and Announcements
LINK:
Unix Manual (man page) pages in HTML
http://www.rt.com/man/
: More then 100 Commands found on a Unix system mannual pages can be obtained/refered here. Good Link.. (1 Reply)
Discussion started by: killerserv
1 Replies
2. OS X (Apple)
Hi
Does anyone know were to go (web link please?) to learn the BACIS of UNIX in OS X, I would like to know a little more about unix (for the apple) but seem to get lost in all the wen sites, and idealy find a site where i could download a manual for the unix shell in OS X.
Any ideas? (4 Replies)
Discussion started by: adrianmoore
4 Replies
3. Shell Programming and Scripting
Is there a Unix (Solaris v8 ksh) version of the old basic command gosub or goto? I've researched the return command, but can't identify the command to return from. I am not trying to return from a function. Can someone give me a basic understanding of this please? Thanks so much in advance for... (3 Replies)
Discussion started by: gozer13
3 Replies
4. UNIX for Dummies Questions & Answers
1) Can a script be made to ignore all signals.
2) Does the parent process always picks up the exit status of its children.
3) Can one program give rise to multiple processes.
4) Is a file is synonymous with a process.
5) Is the kill command only used to kill a running process. (1 Reply)
Discussion started by: yahoo14
1 Replies
5. Shell Programming and Scripting
hi guys...
am new 2 dis unix world...
am in need of a unix manual...
cud sum1 pls post sum links 2 download it?>?>? :confused:
Danks in advance... ;) ;) ;) (1 Reply)
Discussion started by: sundar_shankar
1 Replies
6. UNIX for Dummies Questions & Answers
Hi,I'm currently working on an dev environment that has no jobs to run the scripts.How can I manual run the scripts. on Unix?
---------- Post updated at 05:45 AM ---------- Previous update was at 05:43 AM ----------
Is it something like this....
../int/inbound>./filename.sh inputfilename
... (5 Replies)
Discussion started by: sonja
5 Replies
7. Shell Programming and Scripting
my code does somthing like this:
#!bin/ksh
sqlplus / | While read id
do
temp=`echo $id`
i = i+1
done
j=0
while
do
--connecting to sql and executing a Stored proc for 1st id
--checking for the status
status = $?
if
error
--need to... (1 Reply)
Discussion started by: RP09
1 Replies
8. Shell Programming and Scripting
Hi,
echo "yes or no?"
read ans
case $ans in
*)
echo "yes"
;;
*)
echo "no"
;;
*)
echo "yes or no only"
#here, if the answer is not "Y" or "N", I want to go back to asking "yes or no?" (9 Replies)
Discussion started by: erin00
9 Replies
9. Shell Programming and Scripting
Well, guys I saw a question about GOTO for Python.
So this gave me the inspiration to attempt a GOTO function for 'dash', (bash and ksh too).
Machine: MBP OSX 10.14.3, default bash terminal, calling '#!/usr/local/bin/dash'...
This is purely a fun project to see if it is possible in PURE... (3 Replies)
Discussion started by: wisecracker
3 Replies
LEARN ABOUT ULTRIX
return
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)