Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
arp242
on April 11, 2024
|
parent
|
context
|
favorite
| on:
My deployment platform is a shell script
I like using subshells for this:
( cd dir for f in ./*; [..] )
There's a few scenarios where this won't work (mainly if you want to set a variable from the "outer scope"), but 99% of the time it works nicely.
bravetraveler
on April 11, 2024
[–]
Ah, that's a nice/neat thought - thank you for sharing! Makes total sense, temporary/disposable shell for such things
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: