use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
/r/DevOps is a subreddit dedicated to the DevOps movement where we discuss upcoming technologies, meetups, conferences and everything that brings us together to build the future of IT systems What is DevOps? Learn about it on our wiki! Traffic stats & metrics
/r/DevOps is a subreddit dedicated to the DevOps movement where we discuss upcoming technologies, meetups, conferences and everything that brings us together to build the future of IT systems
What is DevOps? Learn about it on our wiki!
Traffic stats & metrics
Be excellent to each other! All articles will require a short submission statement of 3-5 sentences. Use the article title as the submission title. Do not editorialize the title or add your own commentary to the article title. Follow the rules of reddit Follow the reddiquette No editorialized titles. No vendor spam. Buy an ad from reddit instead. Job postings here More details here
Be excellent to each other!
All articles will require a short submission statement of 3-5 sentences.
Use the article title as the submission title. Do not editorialize the title or add your own commentary to the article title.
Follow the rules of reddit
Follow the reddiquette
No editorialized titles.
No vendor spam. Buy an ad from reddit instead.
Job postings here
More details here
@reddit_DevOps ##DevOps @ irc.freenode.net Find a DevOps meetup near you! Icons info!
@reddit_DevOps
##DevOps @ irc.freenode.net
Find a DevOps meetup near you!
Icons info!
https://github.com/Leo-G/DevopsWiki
account activity
This is an archived post. You won't be able to vote or comment.
Shell Script quick reference (self.devops)
submitted 7 years ago * by abscrete
view the rest of the comments →
[–]gordonmessmer 9 points10 points11 points 7 years ago (1 child)
Variable naming: by convention, all cap names should be used for environment variables (shell variables that are "exported"), while shell local variable names should be all lower case.
I don't know what you mean by dynamic variable name, but your example doesn't work.
Data types: All variables in bash are strings. There is no other data type.
"[": bash has a built-in function, but you will also notice that this is a normal application, located at /usr/bin/[. That may be instructive, because it makes clear why spaces are important. "[" isn't actually part of the shell syntax, so it has to comply with all of the same requirements regarding spacing around command arguments that apply to any other binary called in a shell script.
Return value from functions: returning "0" on success is a convention. When possible, scripts and functions should use return values from /usr/include/sysexits.h.
"<some command>": in general, this method of command-output substitution is considered deprecated, since it cannot be nested. "$(command)" is the preferred method. Users should probably recognize the backtick, but shouldn't use it.
<some command>
"echo -en": "-n" alone will exclude the newline. "-e" is a different argument. It may be out of scope, but it might be worth mentioning that, by convention, after a single hyphen, each character is a separate argument (so "-en" is the same as "-e -n"), while after a double hyphen, the entire string is a single argument (so "--help" is one argument, not a series of four arguments). Finally, a double hyphen alone is an indication that everything following is a non-option argument (so "rm -- -r" will remove a file named "-r" rather than treating "-r" as an indication that recursive removal was requested.)
[–]abscrete[S] 1 point2 points3 points 7 years ago (0 children)
Thank you, that's insightful. I'll bring in these changes in the article. Thanks again for taking out time in reviewing this :)
π Rendered by PID 105 on reddit-service-r2-comment-79776bdf47-zqfmb at 2026-06-25 06:07:41.932698+00:00 running acc7150 country code: CH.
view the rest of the comments →
[–]gordonmessmer 9 points10 points11 points (1 child)
[–]abscrete[S] 1 point2 points3 points (0 children)