Sponsored Content
Full Discussion: Mini Shell in C
Top Forums Programming Mini Shell in C Post 76876 by zylwyz on Friday 1st of July 2005 08:49:37 AM
Old 07-01-2005
Network

Quote:
Beware tho', if the moderators think this reply is in violation of the 'homework rule' they will remove it.
This remark was for me? Smilie
 

7 More Discussions You Might Find Interesting

1. UNIX Desktop Questions & Answers

mini digi-cam

hey guys! I am on a fedora core2 i686 with gui and I have a miniture cool-cam which is digital.. it connects through regular usb.. the system recognizes it and the when I go into the desktop peripheral and go to camera it gives name and tells test was successful.. it also says that the camera has... (0 Replies)
Discussion started by: moxxx68
0 Replies

2. UNIX for Dummies Questions & Answers

mini distribution

Maybe someone knows floppy distribution with which I could connect to the internet and browse sites. THanks for answers (1 Reply)
Discussion started by: Vilmis
1 Replies

3. UNIX for Dummies Questions & Answers

mini shell programming (help)

Hi All, Well i m a taking an operating system course (newbie to unix) we have studied till now: the fork () execv() the teacher asked us to create a mini shell that execute a user command: cmd1 he said everything in is optional we can use any combination Well dudes , i m really... (2 Replies)
Discussion started by: ELECTRO
2 Replies

4. Programming

Some questions for mini game

Hello fellow programmers!:) First of all excuse me for my English, i am from abroad... I am trying to learn the C++ programming language as it is one of the most basic languages.So,instead of just creating small examples for each feature(like class,input/output etc), I decided to create a mini... (6 Replies)
Discussion started by: bashuser2
6 Replies

5. Shell Programming and Scripting

Mini Project

Hi Experts, I'm a newbie.....just now i started to write some simple scripts on my own. Can anyone suggest me any simple project kind of stuff to hone my SHELL SCRIPTING skills....which involves database connection and more than that.....bcoz i already tried to write a script which connects to... (0 Replies)
Discussion started by: kritibalu
0 Replies

6. Shell Programming and Scripting

Need help in a mini project

Hi All, I want to make something like described below - "Double click on an executable file that will check the health status and other things of various linux servers and send an email to a list of people." I can make shell scripts for individual servers but how to make a script that will check... (1 Reply)
Discussion started by: csrohit
1 Replies

7. Shell Programming and Scripting

Thompson MSH(mini-shell)

Hi Guys! Recently, I disassemble the MSH. And reconstructed. I thought maybe somebody wants to see looked like a second shell. In practice, the most ancient shell. It is written in assembler (AT&T). Owner Ken Thompson, Dennis Ritchie. mov $parbuf,r1 mov $parp,r2 clr r3 jsr pc,blank... (0 Replies)
Discussion started by: GLbS
0 Replies
exec(1) 							   User Commands							   exec(1)

NAME
exec, eval, source - shell built-in functions to execute other commands SYNOPSIS
sh exec [argument...] eval [argument...] csh exec command eval argument... source [-h] name ksh *exec [arg...] *eval [arg...] DESCRIPTION
sh The exec command specified by the arguments is executed in place of this shell without creating a new process. Input/output arguments may appear and, if no other arguments are given, cause the shell input/output to be modified. The arguments to the eval built-in are read as input to the shell and the resulting command(s) executed. csh exec executes command in place of the current shell, which terminates. eval reads its arguments as input to the shell and executes the resulting command(s). This is usually used to execute commands generated as the result of command or variable substitution. source reads commands from name. source commands may be nested, but if they are nested too deeply the shell may run out of file descrip- tors. An error in a sourced file at any level terminates all nested source commands. -h Place commands from the file name on the history list without executing them. ksh With the exec built-in, if arg is given, the command specified by the arguments is executed in place of this shell without creating a new process. Input/output arguments may appear and affect the current process. If no arguments are given the effect of this command is to mod- ify file descriptors as prescribed by the input/output redirection list. In this case, any file descriptor numbers greater than 2 that are opened with this mechanism are closed when invoking another program. The arguments to eval are read as input to the shell and the resulting command(s) executed. 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. EXIT STATUS
For ksh: If command is not found, the exit status is 127. If command is found, but is not an executable utility, the exit status is 126. If a redi- rection error occurs, the shell exits with a value in the range 1-125. Otherwise, exec returns a zero exit status. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
csh(1), ksh(1), sh(1), attributes(5) SunOS 5.10 17 Jul 2002 exec(1)
All times are GMT -4. The time now is 06:25 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy