10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi all,
I have a flat file as below;
470423495|1||TSA-A000073800||1|||1
471423495|1||TSA-A000073800||5|||5
472423495|1||TSA-A000073800||2|||7
473423495|1||TSA-A000073800||3|||3
I like to create a Unix script.
The script have to valuate the last two columns, if the values are... (4 Replies)
Discussion started by: mrreds
4 Replies
2. Shell Programming and Scripting
Hello,
I have this:
#!/usr/bin/ksh
V1=ABC
str="hello 123;${V1}"
eval "echo $str"
i get
hello 123
/script.sh ABC not found
However eval works if $str variable doesn't contain a semicolumn (eg if str="hello 123~${v1}"
running the eval statement above would produce (2 Replies)
Discussion started by: endorphin
2 Replies
3. Ubuntu
Hi, I need to create a user from a bash script so i have to use useradd. The problem is that when i create a user with:
useradd -d /home/sample -m sample
after i login with that user I have no history in bash, path do not appears, i can't use arrows and so on. When I use adduser everything is... (5 Replies)
Discussion started by: ktm
5 Replies
4. Programming
hii to all
i am developing a simple unix shell in c i want to add history feature in that how could i do that plz help if there is any tutorial or website plz put it here
history feature should be like that in bash, when press up key show the previous command typed in console
plz be... (1 Reply)
Discussion started by: vipin_jss
1 Replies
5. Shell Programming and Scripting
Hello,
My team and I planing to create a new shell. We are including features like handing the "command not found" exception, etc....
1)Can you please give some suggestions on what do do while writing a new shell.....
2)can you please give me your problems with the existing shells..My... (15 Replies)
Discussion started by: nsharath
15 Replies
6. Programming
How I compile C++ in unix o/s (4 Replies)
Discussion started by: kumbhaj
4 Replies
7. UNIX for Dummies Questions & Answers
Hi
Can anybody explain the following shell features with example
a) Command line editing
b) filename completion
c) job control (1 Reply)
Discussion started by: skyineyes
1 Replies
8. UNIX for Dummies Questions & Answers
compare A.txt with B.txt using windiff and display an output of no configuration found if both txt file is the same and the output will display the differences if the files are different.
how should i program it by using sed.exe and winDiff.exe? (3 Replies)
Discussion started by: rita1985
3 Replies
9. AIX
Hi Unix Experts,
I like to compile and compare all the features that AIX OS (541L) and Solaris OS (Solaris 10) provide.
If somebody can shed on this topic would be highly appreciated.
Thank you,
Khan (0 Replies)
Discussion started by: hkhan12
0 Replies
10. Windows & DOS: Issues & Discussions
I realise that this is probably not the best place to ask DOS questions, but I wouldn't have a clue where to post DOS-related matters
The inevitable has happened and I've been asked to restore some files from a 23/11/1995 MSDOS backup (I think it was DOS 5.x or 6.x at the time).
I'm... (1 Reply)
Discussion started by: mfreemantle
1 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)