The logic behind Assignment 5 is this:
'my_cd' will do the following:
will 1st print out the current directory then the directory you are
going to change to, and then change directories to it.
useful commands:
'my_cd
will 1st print out the current directory then the directory you are
going to change to, and then change directories to it.
useful commands:
'pwd' returns the current working directory
'cd' changes directory
You need to figure out how to read in an argument from the command
line, put that argument value into your script and then change
directories to the that value.
'cd' changes directory
You need to figure out how to read in an argument from the command
line, put that argument value into your script and then change
directories to the that value.
While also remembering to save the
current directory into a variable so you can go back to it using your
custom 'go_back' script. Then:
current directory into a variable so you can go back to it using your
custom 'go_back' script. Then:
'go_back' will:
read the value of the global variable you saved the previous 'pwd' to
then change directories to it.
This can all be done stringing together
linux commands we've already come across
linux commands we've already come across
Good Luck! Contact me via email if you need some further hints.
No comments:
Post a Comment