03-27-2011
learner Shell
a task given to me is to make a shell which will have the following qualities....
"The most rudimentary shell is structured as the following loop:
1. Print out a prompt (e.g., "OS_Spring2011_Shell$ ");
2. Read a line from the user;
3. Parse the line into the program name and an array of parameters;
4. Use the fork() system call to spawn a new child process;
o The child process then uses the exec() system call (or one of its variants)
to launch the specified program;
o The parent process (the shell) uses the wait() system call (or one of its
variants) to wait for the child to terminate;
5. Once the child (the launched program) finishes, the shell repeats the loop by jumping to 1."
please help me in this matter........
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Who could tell me how to learn unix fastly? (4 Replies)
Discussion started by: dsun5
4 Replies
2. AIX
Hi,
Please give me the detailed Differences between writing Unix Shell script and AIX Shell Scripts. Thanks in advance..... (0 Replies)
Discussion started by: haroonec
0 Replies
3. Linux
Hi
I tried with bash --login option. but the output is
siva:~$ bash --login
siva:~$
is there any way to make the shell ask for user id and password ( and login as different user instead of using sudo / su )
Thx in advance
Siva (3 Replies)
Discussion started by: Sivaswami
3 Replies
4. Shell Programming and Scripting
i have a small problem getting a batxh shell script to run in shell
this is the code
the problem seems to be centered around the ffmpeg command, something maybe to do with the ' ' wrapping around the vhook part command
this is a strange problem , if i take the ffmpeg command and... (1 Reply)
Discussion started by: wingchun22
1 Replies
5. Post Here to Contact Site Administrators and Moderators
I'm not so sure that this thread should have been closed. Though it was clearly homework the student was asking a specific question related to the assignment, but not the answer to the whole assignment.
/www.unix.com/unix-dummies-questions-answers/107494-how-get-rid.html .
IMHO The solution is... (1 Reply)
Discussion started by: methyl
1 Replies
6. Shell Programming and Scripting
Hello gurus,
I have three korn shell script 3.1, 3.2, 3.3. I would like to call three shell script in one shell script.
i m looking for something like this
call 3.1;
If 3.1 = "complete" then
call 3.2;
if 3.2 = ''COMPlete" then
call 3.3;
else
exit
The... (1 Reply)
Discussion started by: shashi369
1 Replies
7. Shell Programming and Scripting
hi every body, i am ramesh.
i want write about this shell program (" i have 94 server's like aix, solaris, linux, hp-ux, and sco unix-") how to get mail's from these server's?
(i have personal linux system)- i want to run this program in my personal linux system continuously.
i want to... (4 Replies)
Discussion started by: rameshreddy.ema
4 Replies
8. AIX
Hello All,
Real Newbie to AIX
I need to automate an FTP server to Server.
Want to push the files from an AIX server to an OSX server.
What would be the best command in AIX to do this?
Need help copying contents of \UVdata to 172.16.12.2\ERAbackup\1
Or Alternatively would it be better... (1 Reply)
Discussion started by: Joelly
1 Replies
9. Shell Programming and Scripting
Dear Friends,
Please help me on this
my script name is send.csh
In this i have written the statement like this
set args = ( city state country price )
I want to pass this array to another c shell called receiver.csh. and i want to use it in this c shell
or
how to pass to... (2 Replies)
Discussion started by: SA_Palani
2 Replies
10. Shell Programming and Scripting
Hi guys,
New member here, also new student!
I'm just starting the Shell Programming, currently in chapter four in the Book in Unix, Linux, and OS X by Stephen G. Kochan & Patrick Wood (4th edition).
I'm needing a little help with other possible ways to shorten this shell command:
//
... (1 Reply)
Discussion started by: shiver
1 Replies
LEARN ABOUT CENTOS
platform::shell
platform::shell(n) Tcl Bundled Packages platform::shell(n)
__________________________________________________________________________________________________________________________________________________
NAME
platform::shell - System identification support code and utilities
SYNOPSIS
package require platform::shell ?1.1.4?
platform::shell::generic shell
platform::shell::identify shell
platform::shell::platform shell
_________________________________________________________________
DESCRIPTION
The platform::shell package provides several utility commands useful for the identification of the architecture of a specific Tcl shell.
This package allows the identification of the architecture of a specific Tcl shell different from the shell running the package. The only
requirement is that the other shell (identified by its path), is actually executable on the current machine.
While for most platform this means that the architecture of the interrogated shell is identical to the architecture of the running shell
this is not generally true. A counter example are all platforms which have 32 and 64 bit variants and where a 64bit system is able to run
32bit code. For these running and interrogated shell may have different 32/64 bit settings and thus different identifiers.
For applications like a code repository it is important to identify the architecture of the shell which will actually run the installed
packages, versus the architecture of the shell running the repository software.
COMMANDS
platform::shell::identify shell
This command does the same identification as platform::identify, for the specified Tcl shell, in contrast to the running shell.
platform::shell::generic shell
This command does the same identification as platform::generic, for the specified Tcl shell, in contrast to the running shell.
platform::shell::platform shell
This command returns the contents of tcl_platform(platform) for the specified Tcl shell.
KEYWORDS
operating system, cpu architecture, platform, architecture
platform::shell 1.1.4 platform::shell(n)