Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
zeroimpl
on May 15, 2018
|
parent
|
context
|
favorite
| on:
Safe ways to do things in bash
You just add quotes around $dir. Bash understands the quotes properly/recursively.
parent_dir = "$(basename "$dir")"
codedokode
on May 15, 2018
[–]
So I finally found the answer. Thanks.
8xde0wcNwpslOw
on May 15, 2018
|
parent
[–]
Bear in mind (pointed by the article as well) that variable assignment doesn't allow spaces around the equals sign, and that in this case the outer parentheses are unnecessary anyway.
Join us for
AI Startup School
this June 16-17 in San Francisco!
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: