Closed ggmolly closed 2 years ago
$: . Error: Permission denied: /usr/local/cuda-11.0/targets/x86_64-linux/lib/. $: .. Error: Permission denied: /usr/local/cuda-11.0/targets/x86_64-linux/lib/.. $: ../ Error: Permission denied: /usr/local/cuda-11.0/targets/x86_64-linux/lib/../ $: echo $PATH /usr/local/cuda-11.0/targets/x86_64-linux/lib:/usr/local/cuda-11.0:/home/bacon/.cargo/bin:/home/bacon/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/home/bacon/.local/share/JetBrains/Toolbox/scripts
A single dot . is interpreted as a command, and not a path, which cause minishell to search a binary file called . on first directory in path
.
minishell
The sample above reveals a Permission denied error on an invalid relative path /usr/local/cuda-11.0/targets/x86_64-linux/lib/.
Permission denied
/usr/local/cuda-11.0/targets/x86_64-linux/lib/.
The shell should understand that any relative path (., ../, etc) should be interpreted as paths and not as commands
../
bacon@omelet:~/goinfre/minishell$ . bash: .: filename argument required .: usage: . filename [arguments] bacon@omelet:~/goinfre/minishell$ .. ..: command not found bacon@omelet:~/goinfre/minishell$ ../ bash: ../: Is a directory
MINISHELL:
A single dot
.
is interpreted as a command, and not a path, which causeminishell
to search a binary file called.
on first directory in pathThe sample above reveals a
Permission denied
error on an invalid relative path/usr/local/cuda-11.0/targets/x86_64-linux/lib/.
Expected behavior
The shell should understand that any relative path (
.
,../
, etc) should be interpreted as paths and not as commandsBash behavior example