Activity for nogjamâ€
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Edit | Post #292912 |
Post edited: Improve the answer's "abstract" |
— | 20 days ago |
Edit | Post #292912 |
Post edited: Clarify substring expansion example |
— | 20 days ago |
Edit | Post #292912 |
Post edited: Add conclusion referring to the specific code in OP's question |
— | 20 days ago |
Comment | Post #292912 |
Good point! Edited the answer to clarify. (more) |
— | 20 days ago |
Edit | Post #292912 |
Post edited: Clarify meaning of "checks for" and add examples |
— | 20 days ago |
Edit | Post #292912 |
Post edited: Reorder answer for clarity |
— | 21 days ago |
Edit | Post #292912 | Initial revision | — | 22 days ago |
Answer | — |
A: What does ${2-} mean in bash? The dash, `-`, is part of a Parameter Expansion syntax that tells Bash to check for existence of the preceding parameter, a.k.a. whether it is "set", substituting whatever follows if it isn't. For the particular case of `${2-}`, an empty string will be substituted if the second positional parameter d... (more) |
— | 22 days ago |
Comment | Post #292911 |
The ideal answer would point to a section in the GNU Bash Manual: https://www.gnu.org/software/bash/manual/html_node/ (more) |
— | 22 days ago |
Edit | Post #292911 | Initial revision | — | 22 days ago |
Question | — |
What does ${2-} mean in bash? I came across this in a bash script: `excludes+=("${2-}")` What is the meaning of `${2-}`? (more) |
— | 22 days ago |
Comment | Post #291681 |
Yep, I think your answer edit clarifies. Yes, VastIncrease2 is me. I also discovered that my reply to my primary post seems not to be visible, which could be causing some confusion. I'll go ahead and write the question + answer, hopefully that will clear things up. (more) |
— | 5 months ago |
Comment | Post #291681 |
Thanks @#64277. Can you please elaborate on "a bit thin"? Would help if I do end up writing this Q/A. Also, are you referring to the post directly linked, or also to the reply I added to it? I think the reply would actually be the bulk of what I'd post on this site. (more) |
— | 6 months ago |
Edit | Post #291679 |
Post edited: Point out the Reddit reply |
— | 6 months ago |
Comment | Post #291679 |
I updated my question. Lmk if that helps clarify. (more) |
— | 6 months ago |
Edit | Post #291679 |
Post edited: Clarify meaning of "general how-to" |
— | 6 months ago |
Comment | Post #291643 |
`echo -n` also omits the newline. (more) |
— | 6 months ago |
Edit | Post #291679 |
Post edited: |
— | 6 months ago |
Edit | Post #291679 | Initial revision | — | 6 months ago |
Question | — |
Do domain-specific how-to's fit well within Q&A? I've recently gained some PAM (Pluggable Authentication Modules) knowledge. I had written a Reddit post plus reply and then thought the stuff I shared would fit well here. Do domain-specific how-to questions like this fit well within the Q&A category, or would this work better in something like a ... (more) |
— | 6 months ago |