implementing mkdir, chdir, mv, pwd inside a shell !

 
Thread Tools Search this Thread
Homework and Emergencies Homework & Coursework Questions implementing mkdir, chdir, mv, pwd inside a shell !
# 1  
Old 11-03-2009
CPU & Memory implementing mkdir, chdir, mv, pwd inside a shell !

1. The problem statement, all variables and given/known data:

need to implement mkdir, chdir, mv, pwd

given a shell.cpp directory.cpp and some other files

this shell missing these commands, and i need to implement them inside the shell

2. Relevant commands, code, scripts, algorithms:

shell included in this file:
http://avida.cs.wright.edu/courses/C...Winter.tar.bz2


3. The attempts at a solution (include all code and scripts):

the mkdir is not working from inside the shell. neither chdir , mv or pwd.

i successfuly implemented piping ,redirection, execution in the background in earlie assigment, but this assigment is not working out

4. School (University) and Course Number:

CEG433/CEG633 - Operating Systems
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Implementing linked list in shell scripting

Hello Experts, Is it possible to implement linked list in shell scripting? is yes then how can we do it? Any working example is highly appreciated. Thanks in advance. (4 Replies)
Discussion started by: mukulverma2408
4 Replies

2. Shell Programming and Scripting

Implementing Listagg like function in shell

Hi, Basically what I am trying to do is making multiple fields of the same type comma-separated. i.e. for a data like this: B00000 abc B00001 abc,def B00001 ghi B00001 jkl B00002 abc B00002 def B00003 xyz Output should be like: B00000 abc B00001 abc,def,ghi,jkl... (20 Replies)
Discussion started by: prohank
20 Replies

3. Shell Programming and Scripting

Need help implementing a timout in my Shell Script for RHEL6

Hey Guys, My problem: I have a script that will be querying the database every minute to see if it gets a response, the response its querying for is "UP" in a table i made called dbup in the database. Now, I am trying to add the component to implement a timeout if the script does not get a... (2 Replies)
Discussion started by: mo_VERTICASQL
2 Replies

4. Shell Programming and Scripting

script to change shell's pwd

Hi there, i was presented with a challenge that is beyond my current shell knowledge: how can you have a script that executed interactive will change your current working directory? Example (under MacOS): 1. start Terminal and my current working directory is my home folder 2. execute a... (3 Replies)
Discussion started by: gigagigosu
3 Replies

5. AIX

sync samba pwd with aix5.3 pwd

currently, my samba login works just fine. i want my clients to use aix5.3 account to login to samba so they don't have to change samba pwd and aix pwd. i googled, and vi /usr/lib/smb.conf per some of knowledge base, but i could not get to work. aix5.3 and samba 3.0.24.0 thanks in advace..... (2 Replies)
Discussion started by: tjmannonline
2 Replies

6. Shell Programming and Scripting

Implementing Queue Using Shell scripts

HI I want to implement a control mechanism using Shell scripts .The intention is to have controlled number of jobs running in parallel External process will kickstart 40 jobs in parallel .All the 40 jobs will call the same generic script with different parameter values .But at a... (4 Replies)
Discussion started by: police
4 Replies

7. Programming

Implementing a shell in C

Hi, I am implementing a shell in C, with the following problem... Suppose the shell is invoked from the command line as >> myshell < test.in > test.out 2>&1 I have to execute the commands in test.in and redirect them to test.out How does one detect in the main function that the shell... (1 Reply)
Discussion started by: jacques83
1 Replies

8. Programming

need help in implementing simple interactive shell in C

hello all, i hv attached herewith my program to implement a simple interactive shell in C. no matter hw hard I try, I keep getting some errors. i need help - urgently !! proj1test7.c: In function `parseCommand': proj1test7.c:102: warning: assignment makes pointer from integer without a cast... (2 Replies)
Discussion started by: nix1209
2 Replies

9. Programming

Implementing a shell

I'm implementing a shell in C that supports piping, output redirection, and background processing, and a few other commands. I was wondering how I'd go about implementing the output redirection. So, I'd open a file and I'd fork and execute the command. But how would I get stdout into the file? Any... (10 Replies)
Discussion started by: ununium
10 Replies

10. UNIX for Dummies Questions & Answers

echo $SHELL, $PWD and etc.

hi, this echo $SHELL will give the shell name.. how to get the other list of variables (besides SHELL) values? and also, different shells have different variable names (example SHELL) (10 Replies)
Discussion started by: yls177
10 Replies
Login or Register to Ask a Question
PWD(1)							    BSD General Commands Manual 						    PWD(1)

NAME
pwd -- return working directory name SYNOPSIS
pwd [-LP] DESCRIPTION
pwd writes the absolute pathname of the current working directory to the standard output. The following options are available: -L If the PWD environment variable is an absolute pathname that contains neither "/./" nor "/../" and references the current directory, then PWD is assumed to be the name of the current directory. -P Print the physical path to the current working directory, with symbolic links in the path resolved. The default for the pwd command is -P. pwd is usually provided as a shell builtin (which may have a different default). EXIT STATUS
The pwd utility exits 0 on success, and >0 if an error occurs. SEE ALSO
cd(1), csh(1), ksh(1), sh(1), getcwd(3) STANDARDS
The pwd utility is expected to be conforming to IEEE Std 1003.1 (``POSIX.1''), except that the default is -P not -L. BUGS
In csh(1) the command dirs is always faster (although it can give a different answer in the rare case that the current directory or a con- taining directory was moved after the shell descended into it). pwd -L relies on the file system having unique inode numbers. If this is not true (e.g., on FAT file systems) then pwd -L may fail to detect that PWD is incorrect. BSD
October 30, 2003 BSD