Sponsored Content
Top Forums UNIX for Dummies Questions & Answers I need help with a noobie shell script. Post 302141658 by porter on Sunday 21st of October 2007 12:36:56 PM
Old 10-21-2007
Quote:
Originally Posted by buttons
I am in an intro unix class and I am completely stumped ...
... especially with the "no homework rule" on this website.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Unix Noobie Needs help with scripting

I've just begun using/studying Unix and I've run into a problem. I'm attempting to write a script that will replace a string within a textfile with another string, backing up the file before editing it. This is what I have so far, but I'm getting a "command not found" error. example input: ... (2 Replies)
Discussion started by: Vamirr
2 Replies

2. Solaris

New born noobie with an easy question

I was told on a website that unix can help you make one. I was just wondering how and can you help me with a web page of my own. (1 Reply)
Discussion started by: Shintouku
1 Replies

3. UNIX for Dummies Questions & Answers

Network noobie question

This is my first attempt in installing a netbsd ever. I'm trying to get myself familiar with some commands and how things work in unix and so far i never knew its this fun. Anyway, unix is our elective here in school and school is gonna start 2 weeks. I'm just trying to get a headstart on this :D... (2 Replies)
Discussion started by: 3rr0r_3rr0r
2 Replies

4. Windows & DOS: Issues & Discussions

Noobie with Linux emu: Need help with emu's

Hi i have recently downloaded the cygwin emulator on my windows xp machine and i installed it onto my laptop and all was fine. The thing is i have never known how to use it really. I am wanting to use linux on windows since i have some programs that work on linux only. I have a program called... (1 Reply)
Discussion started by: Sharkadder
1 Replies

5. Programming

Noobie in C

Hi to everyone , I am learning C language and I have problem with one example from book #include <stdio.h> int main() { char me; printf(“What is your name?”); scanf(“%s”,&me); printf(“Welcome, %s!\n”,me); return(0); } when I want to... (5 Replies)
Discussion started by: solaris_user
5 Replies

6. Shell Programming and Scripting

How to use ssh execute other shell script on other host (shell script include nohup)?

i want use ssh on the host01 to execute autoexec.sh on the host02 like following : host01> ssh host02 autoexec.sh autoexec.sh include nohup command like follwing : nohup /home/jack/deletedata.sh & after i execute ssh host02 autoexec.sh one the host01. i can't found deletedata.sh... (1 Reply)
Discussion started by: orablue
1 Replies

7. Shell Programming and Scripting

help while looping simple noobie

hi guys i have linked my lab 15. i have no idea where to start i dont understand whats it asking me. about the screen shot part!.. if someone can take a quick look and help me out with this unix lab that would be great.. i have did the Required Errorlevels Errorlevel #Event Information ... (1 Reply)
Discussion started by: beerpong1
1 Replies

8. Shell Programming and Scripting

Unable to pass shell script variable to awk command in same shell script

I have a shell script (.sh) and I want to pass a parameter value to the awk command but I am getting exception, please assist. diff=$1$2.diff id=$2 new=new_$diff echo "My id is $1" echo "I want to sync for user account $id" ##awk command I am using is as below cat $diff | awk... (2 Replies)
Discussion started by: Ashunayak
2 Replies

9. UNIX for Dummies Questions & Answers

How to write Config shell script to pass variables in master shell script?

Dear Unix gurus, We have a config shell script file which has 30 variables which needs to be passed to master unix shell script that invokes oracle database sessions. So those 30 variables need to go through the database sessions (They are inputs) via a shell script. one of the variable name... (1 Reply)
Discussion started by: dba1981
1 Replies

10. Shell Programming and Scripting

How to write config shell script to pass variables in master shell script?

Dear Unix gurus, We have a config shell script file which has 30 variables which needs to be passed to master unix shell script that invokes oracle database sessions. So those 30 variables need to go through the database sessions (They are inputs) via a shell script. one of the variable name... (1 Reply)
Discussion started by: dba1981
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)
All times are GMT -4. The time now is 04:32 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy