Status
Not open for further replies.
Solution
What to type in is the question. As an assignment this is supposed to be testing your knowledge and/or ability to do research, so there would be little point in supplying you with an answer. If you are really having difficulty with this you might like to have a word with your tutor.

McHenryB

Admirable
What to type in is the question. As an assignment this is supposed to be testing your knowledge and/or ability to do research, so there would be little point in supplying you with an answer. If you are really having difficulty with this you might like to have a word with your tutor.
 
Solution

McHenryB

Admirable
Sorry. I didn't notice that you had edited your post.

That script will create the directories "a1.A/documents/pictures", which is not what you want. You want "documents/pictures". Actually, as the script itself is called "a1.A" it will fail with the error "mkdir: cannot create directory ‘a1.A/documents/pictures’: Not a directory"

You may want to review the man page for mkdir.
 
I think some of the confusion here is what the 'script' actually is.

pico is a text editor, like notepad.exe on windows. the 'script' is just a text file containing the commands you would enter into a terminal. It is not a script that does anything, or is executable until you do some special things to the script.

the mkdir command is analogous to 'RightClick->New Folder" in windows.
To make a new directory in your "home" directory you can do:
mkdir /home/username_goes_here/documents/
mkdir /home/username_goes_here/documents/pictures
or
mkdir ~/documents/
mkdir ~/documents/pictures/

These are commands that you would execute on the command line, not inside of pico.
pico ~/lnxll55.txt
creates or opens a file lnxl55.txt then you would just type those commands into the text file.

If you want to execute the file/script, first give it executable privlages then run the file!
chmod +x ~/lnxl55.txt
sh ~/lnxl55.txt (or ./lnxl55.txt)

 
Ok at this point you just have a complete failure of understanding your task. Please re-read your assignment and review these commands and you will of course see what you did wrong. This is really basic things... God help you if you can't get it figured out from here.

BTW whatever font you are using on your iphone there is <mod edit> RETARDED. 1's look like l's and some charaters are not formatted correctly. Switch to a proper font ASAP.

Code:
mkdir ~/lnx155.a1
pico ~/lnx155.a1/a1.A
<save these commands into the a1.A file>
Code:
mkdir ~/lnx155.a1/documents
mkdir ~/lnx155.a1/documents/pictures
<make it executable and run the script>
Code:
chmod +x ~/lnx155.a1/a1.A
./lnx155.a1/a1.A

Before you turn your assignment in, verify that the code actually does what you want it to..
 
Status
Not open for further replies.