Hacker News new | past | comments | ask | show | jobs | submit login

You don’t need export here:

export DURATION="${1:-1m}"

it should be just

DURATION="${1:-1m}"

“export” is a keyword that makes a variable available to subprocesses.




Good point. I tried it without it, and for some reason it didn't work. I didn't feel like figuring out why, so I left it. (My excuse was that in the future using an env var could let me set my default checking duration for the day/session without editing and reloading my .bashrc; obviously I'd have to check whether it was already set rather than just overwriting it, though.)




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: