I'm just so stressed struggling about this simple grammar.
I learned in text;
To store value in shell programming, we use value=$(expression)
.
So I made following script
#!/bin/bash
address=$1
echo $address
value=$(test -d $address)
echo $value
This is a script to find if my input(directory) exists and accessible.
Address shows me the input but $value
shows nothing.
At least I expected 0 or non-zero but it didn't!
Can anybody teach me how to save the result of test?