Computing.Net > Forums > Unix > unix

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

unix

Reply to Message Icon

Name: paul
Date: November 23, 1998 at 13:29:04 Pacific
Comment:

To whom it my concern i was hoping you might be able to help a confused first year computing student. I have been set the following assignment which i am having alot of difficulty with, and was hoping you might have some useful info. which might help in my studies or even some useful tips
thank you for your time, hope to hear from you soon if your not to busy that is.
Your's sincerely
Paul.

Part A - DOS command interface

You will create a DOS command interface that allows DOS users to interact with UNIX.

1. Create a directory called $HOME/dbin that will contain your DOS command interpreter commands
2. In dbin, create scripts for each of the DOS commands below:

DOS
Cd
Md
Rd
Dir
Copy
Del
Type
Rename
Edit

3. In dbin, create a script called unixtodos that:
· sets the user prompt to show the current directory
· adds the your dbin directory to the PATH


4. In dbin, create a script called dostounix that restores the:
· path
· and the prompt

5. In dbin, as part of the DOS environment, write a script called compile, that takes the filename of a C source program, compiles it using the gcc compiler and creates a executable file using the filename

[i.e.]
$ compile hello
$ ls -F
hello.c
hello*
$

6. System Calls - Create a new command for the DOS environment called createfile that uses a system call to create a blank UNIX file with the following default file permissions

-rw-r--r--

7. Write a utility for the DOS environment called bytes, that displays the size in bytes of any specified filename



Sponsored Link
Ads by Google

Response Number 1
Name: john
Date: November 23, 1998 at 13:38:04 Pacific
Reply:

hello there,
my name is john and i have a problem
with a networking assement.
i need ideas for a small network.
and some information on unix shell scripts


0

Response Number 2
Name: Anthony
Date: December 3, 1998 at 06:03:14 Pacific
Reply:

Paul,
Reference the above problems, do you know any unix?
If not, it would be advisable to go out and get a good boot, however the above scripts should only have to be a few lines. I will give you the equivalent unix commands and that should atleast point you in the right direction.

DOS UNIX
Cd chdir
Md mkdir
Rd rmdir
Dir ls
Copy cp
Del rm
Type cat (or more)
Rename mv
Edit vi (not very friendly!)

3. Your prompt is stored as variable PS1 and path can be added useing:
PATH=$PATH:$HOME/dbin

I don't want to tell you all the answers but if you need any more help then please contact me.

Regards,

Anthony.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: unix

need help for learning unix script www.computing.net/answers/unix/need-help-for-learning-unix-script/7745.html

UNIX (file executed date) www.computing.net/answers/unix/unix-file-executed-date/8232.html

UNIX/changing date format www.computing.net/answers/unix/unixchanging-date-format/8440.html