Display & list directory contents,make & change directory, Programming Languages

W.A.S.S to perform the following operations depending upon the menu choice:

                              i.    Display current directory.

                            ii.    List directory contents.

                           iii.    Make a directory.

                           iv.    Change the directory.

                            v.    Rename a file.

                           vi.    Remove the file.

                         vii.    Edit a file.




#W.A.S.S. to perform the operation like display current directory,make directory,change #directory, rename file, remove file,edit file


echo "a)Display current directory:"

echo "b)List directory contents:"

echo "c)Make a directory:"

echo "d)Change the directory:"

echo "e)Rename a file:"

echo "f)Remove a file:"

echo "g)Edit a file:"

echo -e "Enter your choice:\c"

read c


case $c in

a)echo -e "A present working directory is: \c"




b) ls



c )echo -e "Enter a name of dir: \c"

    read dnm

    mkdir "$dnm"



d)echo -e "Enter name of dir to change in: \c"

   read dnm

   cd "$dnm"





e)echo -e "Enter name of dir to rename: \c"

   read dnm

   echo -e "Enter New name of dir: \c"

   read ndnm

   mv "$dnm" "$ndnm"



f)echo -e "Enter name of file to remove; \c"

  read dnm

  rmdir "$dnm"



g)echo -e "Enter name of file to edit: \c"

  read dnm

  vi "$dnm"






a)Display current directory:

b)List directory contents:

c)Make a directory:

d)Change the directory:

e)Rename a file:

f)Remove a file:

g)Edit a file:


Enter your choice:a

A present working directory is: /root


Enter your choice:e

Enter name of dir to rename: temp.sh

Enter New name of dir: tempy.sh


Enter your choice:f

             Enter name of dir to remove; xyz

Posted Date: 9/26/2012 6:34:30 AM | Location : United States

Related Discussions:- Display & list directory contents,make & change directory, Assignment Help, Ask Question on Display & list directory contents,make & change directory, Get Answer, Expert's Help, Display & list directory contents,make & change directory Discussions

Write discussion on Display & list directory contents,make & change directory
Your posts are moderated
Related Questions
Special Matrices There are some "special" matrices out there which we may use on occasion. The square matrix is the first special matrix.  A square matrix is any matrix that s

Why no Audible support for Linux? Maybe they should use a browser interface?

Write a program that inputs two positive integers of, at most, 20 digits and outputs the sum of the numbers. If the sum of the numbers has more than 20 digits, output the sum with

Project2: A Simple Distributed Computing Platform (Due at 11:59:59pm on 04/12/2012 (EST)) Description: You are asked to develop a replicator (client) that distributes a large job

Triple Eigenvalue with 1 Eigenvector The eigenvalue/vector pair in this case are l and  ?h , . Since the eigenvalue is real we know as the first solution we require is, e l

Task 1 Think about a Web site you would like to work on for Assignment 2. For example, you can do a personal interest site, a site for your favourite nonprofit organization,

Use recursion to de ne a function position which has as input an integer, a character and a string and returns the result of inserting the character in the string at the position s

Write a script called 'prob3.m' that does the same thing as the previous question except that it makes use of a switch-case construct instead of an if-else. In the file 'hw4.m'

1. Develop a Web page, indicating an ordered list of the names of your five friends. 2. Develop an HTML document with a nested list indicating the content page of any book 3.

The program presents mainframe contains two button new user, existing user PART ONE: CLICKING ON NEW USER New window appear contains: text field represent username,