PLEASE NOTE: the upgrades to this server, secure.csse.uwa.edu.au, have not yet been completed.
Hopefully the changes will be completed on THURSDAY 8th December.
Web-based programs, such as csmarks, cssubmit, and the help fora, will be unavailable at some time on Thursday 8th.
  It's UWAweek 49

help2002

This forum is provided to promote discussion amongst students enrolled in CITS2002 Systems Programming.
Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.

Displaying the 4 articles in this topic
Showing 4 of 919 articles.
Currently no other people reading this forum.


 UWA week 40 (2nd semester, week 10) ↓
SVG not supported

Login to reply

👍?
helpful
9:10am Thu 6th Oct, Cohen R.

Hi, I was doing the project and I kept getting errors about opening directories and I soon found out that it was because my directory names have spaces in them. Is there a way to solve this? I tried just adding quoted in the command line but when I tried going inside the directory and passing the realpath it removes the quotes which throws an error again. I couldn't find any information about this on the lectures so I was wondering if I could get some advice. Thank you!


SVG not supported

Login to reply

👍?
helpful
9:18am Thu 6th Oct, Christopher M.

"Cohen Rafiq" <23*4*9*[email protected]*u*e*t*u*a*e*u*a*> wrote:
> Hi, I was doing the project and I kept getting errors about opening directories and I soon found out that it was because my directory names have spaces in them. Is there a way to solve this? I tried just adding quoted in the command line but when I tried going inside the directory and passing the realpath it removes the quotes which throws an error again. I couldn't find any information about this on the lectures so I was wondering if I could get some advice.
There is nothing wrong with having spaces in a file or directory name; it must be your code that is trying to find/break file or directory names into words or tokens. If you place double quotes around multiple words on the command-line: program "word1 word2 word3" then the shell removes the double quotes and passes it all as a single argument to the program.


SVG not supported

Login to reply

👍?
helpful
9:37am Thu 6th Oct, Cohen R.

Thank you I figured it out but now I have another problem. It wasn't spaces but realpath is adding $v at the end instead of the path: $v/mnt/c/Users/.../Project2/test /mnt/c/Users/.../Project2/$v and this is causing it not to work. Do you have any idea why?


SVG not supported

Login to reply

👍?
helpful
9:38am Thu 6th Oct, Christopher M.

"Cohen Rafiq" <23*4*9*[email protected]*u*e*t*u*a*e*u*a*> wrote:
> Thank you I figured it out but now I have another problem. It wasn't spaces but realpath is adding $v at the end instead of the path: > $v/mnt/c/Users/.../Project2/test > /mnt/c/Users/.../Project2/$v > > and this is causing it not to work. Do you have any idea why?
realpath() does not do this; it must be something else in your code.

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  1:17AM Sep 14 2022
Privacy policy