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 DEBIAN
load_dat_font
load_dat_font(3alleg4) Allegro manual load_dat_font(3alleg4)
NAME
load_dat_font - Loads a FONT from an Allegro datafile.
SYNOPSIS
#include <allegro.h>
FONT *load_dat_font(const char *filename, RGB *pal, void *param)
DESCRIPTION
Loads a FONT from an Allegro datafile. You can set param parameter to point to an array that holds two strings that identify the font and
the palette in the datafile by name. The first string in this list is the name of the font. You can pass NULL here to just load the first
font found in the datafile. The second string can be used to specify the name of the palette associated with the font. This is only
returned if the pal parameter is not NULL. If you pass NULL for the name of the palette, the last palette found before the font was found
is returned. You can also pass NULL for param, which is treated as if you had passed NULL for both strings separately. In this case, the
function will simply load the first font it finds from the datafile and the palette that precedes it.
For example, suppose you have a datafile named `fonts.dat' with the following contents:
FONT FONT_1_DATA
FONT FONT_2_DATA
FONT FONT_3_DATA
PAL FONT_1_PALETTE
PAL FONT_2_PALETTE
Then the following code will load FONT_1_DATA as a FONT and return FONT_1_PALETTE as the palette:
FONT *f;
PALETTE pal;
char *names[] = { "FONT_1_DATA", "FONT_1_PALETTE" }
f = load_dat_font("fonts.dat", pal, names);
If instead you want to load the second font, FONT_2, from the datafile, you would use:
FONT *f;
PALETTE pal;
char *names[] = { "FONT_2_DATA", "FONT_2_PALETTE" }
f = load_dat_font("fonts.dat", pal, names);
If you want to load the third font, but not bother with a palette, use:
FONT *f;
char *names[] = { "FONT_3_DATA", NULL }
f = load_dat_font("fonts.dat", NULL, names);
RETURN VALUE
Returns a pointer to the font or NULL on error. Remember that you are responsible for destroying the font when you are finished with it to
avoid memory leaks.
SEE ALSO
register_font_file_type(3alleg4), load_font(3alleg4)
Allegro version 4.4.2 load_dat_font(3alleg4)