isha/linux-shell

Update cd to work with relative paths (~, . , .. )

Closed this issue · 3 comments

isha commented
Update cd to work with relative paths (~, . , .. )

what second parameter ( of type char ***) do i pass in parseString() to get the number of directories in PWD? The first parameter im using is cmdArray[1]

Raphael used it in the EXECUTE COMMAND section at the end of the code so you can look there. If you need it to see the number of directories you may also have to modify the delimiters used by parseString().

Do we still need to break up cmdArray[1] into an array of directory names? I thought the chdir() C function handles the .. path already.