Answer the question
In order to leave comments, you need to log in
Why is the script throwing an error?
I need to write a simple script that will give me the contents of a specified directory.
#!/bin/bash
echo -n "Enter a folder name: "
read way
ls $way
ls: cannot access 'path specified': No such file or directoryGiven that the specified path exists, and when the command is executed in the terminal, everything is displayed.
Answer the question
In order to leave comments, you need to log in
Given that the specified path exists, and when the command is executed in the terminal, everything is displayed.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question