summaryrefslogtreecommitdiff
path: root/1088/CH4/EX4.5
diff options
context:
space:
mode:
Diffstat (limited to '1088/CH4/EX4.5')
-rwxr-xr-x1088/CH4/EX4.5/Example5.sce61
-rwxr-xr-x1088/CH4/EX4.5/Result5.pdf82
-rwxr-xr-x1088/CH4/EX4.5/Result5.txt82
3 files changed, 225 insertions, 0 deletions
diff --git a/1088/CH4/EX4.5/Example5.sce b/1088/CH4/EX4.5/Example5.sce
new file mode 100755
index 000000000..c172b80d7
--- /dev/null
+++ b/1088/CH4/EX4.5/Example5.sce
@@ -0,0 +1,61 @@
+clear
+mode(-1)
+rmdir('pis')
+pwd
+cwd=ans
+clc
+
+printf("Example 5 : Show the method of removing a directory\n named pis(after creating a directory named pis) \n \t\tand surf to the same directory \n")
+disp("****************************************************************")
+disp("Answer : ")
+disp("INSTRUCTIONS : ")
+printf("\nHere all instructions are preloaded in the form of a demo\nPRESS ENTER AFTER EACH COMMAND to see its RESULT\nPRESS ENTER AFTER EACH RESULT TO GO TO THE NEXT COMMAND\n")
+halt('.............Press [ENTER] to continue.....')
+halt("")
+clc
+printf("\tUNIX SHELL SIMULATOR(DEMO VERSION WITH PRELOADED COMMANDS)\n\n\n")
+
+printf("\n\n$ mkdir pis #To make a directory named pis\n\n")
+halt("........# (hit [ENTER] )")
+clc(1)
+mkdir('pis')
+
+printf("\n\n\n$ cd pis;pwd #To go to the directory named pis and open it\n\n")
+halt("........# (hit [ENTER] )")
+clc(1)
+cd 'pis'
+xt=ans
+printf(" %s \n",xt)
+halt("........# (hit [ENTER] )")
+
+printf("\n\n\n$ cd .. #To go to the parent directory\n\n")
+halt("........# (hit [ENTER] )")
+clc(1)
+cd(cwd)
+xt=ans
+
+printf("\n\n\n$ pwd \n\n")
+halt("........# (hit [ENTER] for result)")
+clc(1)
+printf(" %s \n",xt)
+halt("........# (hit [ENTER] for next instruction)")
+
+
+printf("\n\n\n$ rmdir pis #To make a directory named pis \n\n")
+halt("........# (hit [ENTER] )")
+clc(1)
+rmdir pis
+
+printf("\n\n\n$ ls pis #To go to the current directory\n\n")
+halt("........# (hit [ENTER] )")
+clc(1)
+ls pis
+printf(" pis : No such file or directory \n ")
+
+printf("\n\n\n$ exit #To exit the current simulation terminal and return to Scilab console\n\n")
+halt("........# (hit [ENTER] )")
+cd(cwd)
+//clc()
+
+printf("\n\n\t\t\tBACK TO SCILAB CONSOLE...\nLoading initial environment')
+sleep(1000)
diff --git a/1088/CH4/EX4.5/Result5.pdf b/1088/CH4/EX4.5/Result5.pdf
new file mode 100755
index 000000000..794cbc50d
--- /dev/null
+++ b/1088/CH4/EX4.5/Result5.pdf
@@ -0,0 +1,82 @@
+ ans =
+
+ 1.
+
+-->exec('Example5.sci',-1)
+Current date is 02-Jun-2013
+
+Welcome to the Textbook Companionship Project 2013
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+ Book Title : UNIX CONCEPTS AND APPLICATIONS
+
+ Book Edition : 4
+
+ Book Author : Sumitabha Das
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+ Code Author : Pranav Bhat T
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+ Chapter Number : 4
+
+ Chapter Title : THE FILE SYSTEM
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+Example 5 : Show the method of removing a directory
+ named pis(after creating a directory named pis)
+ and surf to the same directory
+
+ ****************************************************************
+
+ Answer :
+
+ INSTRUCTIONS :
+
+Here all instructions are preloaded in the form of a demo
+PRESS ENTER AFTER EACH COMMAND to see its RESULT
+PRESS ENTER AFTER EACH RESULT TO GO TO THE NEXT COMMAND
+.............Press [ENTER] to continue..... UNIX SHELL SIMULATOR(DEMO VERSION WITH PRELOADED COMMANDS)
+
+
+
+
+$ mkdir pis #To make a directory named pis
+
+........# (hit [ENTER] )
+
+
+$ cd pis;pwd #To go to the directory named pis and open it
+
+........# (hit [ENTER] ) C:\Users\Pranav Bhat\Documents\TCPMUM\Chapter4\pis
+........# (hit [ENTER] )
+
+
+$ cd .. #To go to the parent directory
+
+........# (hit [ENTER] )
+
+
+$ pwd
+
+........# (hit [ENTER] for result) C:\Users\Pranav Bhat\Documents\TCPMUM\Chapter4
+........# (hit [ENTER] for next instruction)
+
+
+$ rmdir pis #To make a directory named pis
+
+........# (hit [ENTER] )
+
+
+$ ls pis #To go to the current directory
+
+........# (hit [ENTER] ) pis : No such file or directory
+
+
+
+$ exit #To exit the current simulation terminal and return to Scilab console
+
+........# (hit [ENTER] )
+
+ BACK TO SCILAB CONSOLE...
+Loading initial environment
+-->diary(0)
diff --git a/1088/CH4/EX4.5/Result5.txt b/1088/CH4/EX4.5/Result5.txt
new file mode 100755
index 000000000..794cbc50d
--- /dev/null
+++ b/1088/CH4/EX4.5/Result5.txt
@@ -0,0 +1,82 @@
+ ans =
+
+ 1.
+
+-->exec('Example5.sci',-1)
+Current date is 02-Jun-2013
+
+Welcome to the Textbook Companionship Project 2013
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+ Book Title : UNIX CONCEPTS AND APPLICATIONS
+
+ Book Edition : 4
+
+ Book Author : Sumitabha Das
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+ Code Author : Pranav Bhat T
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+ Chapter Number : 4
+
+ Chapter Title : THE FILE SYSTEM
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+Example 5 : Show the method of removing a directory
+ named pis(after creating a directory named pis)
+ and surf to the same directory
+
+ ****************************************************************
+
+ Answer :
+
+ INSTRUCTIONS :
+
+Here all instructions are preloaded in the form of a demo
+PRESS ENTER AFTER EACH COMMAND to see its RESULT
+PRESS ENTER AFTER EACH RESULT TO GO TO THE NEXT COMMAND
+.............Press [ENTER] to continue..... UNIX SHELL SIMULATOR(DEMO VERSION WITH PRELOADED COMMANDS)
+
+
+
+
+$ mkdir pis #To make a directory named pis
+
+........# (hit [ENTER] )
+
+
+$ cd pis;pwd #To go to the directory named pis and open it
+
+........# (hit [ENTER] ) C:\Users\Pranav Bhat\Documents\TCPMUM\Chapter4\pis
+........# (hit [ENTER] )
+
+
+$ cd .. #To go to the parent directory
+
+........# (hit [ENTER] )
+
+
+$ pwd
+
+........# (hit [ENTER] for result) C:\Users\Pranav Bhat\Documents\TCPMUM\Chapter4
+........# (hit [ENTER] for next instruction)
+
+
+$ rmdir pis #To make a directory named pis
+
+........# (hit [ENTER] )
+
+
+$ ls pis #To go to the current directory
+
+........# (hit [ENTER] ) pis : No such file or directory
+
+
+
+$ exit #To exit the current simulation terminal and return to Scilab console
+
+........# (hit [ENTER] )
+
+ BACK TO SCILAB CONSOLE...
+Loading initial environment
+-->diary(0)