You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
Required fields*
- 
        3There's shellcheck, but as a general rule, if you have bash scripts that are hundreds of lines long you should almost certainly be using a proper programming language and not a shell. The shell isn't made for this sort of thing.terdon– terdon ♦2021-10-05 21:28:30 +00:00Commented Oct 5, 2021 at 21:28
- 
        Thanks for shellcheck. I don't do extended logic with bash, none of my functions are more than say 30 lines long. There is utility in bash being "always there" and being the interface that I interact with a system, so I've never bought into that whole "bash bashing philosophy" of saying that bash is not a "proper language"; it has a lot of utility. I use other languages too (python, powershell, c#). My 1,000+ line bash scripts are sets of useful day to day functions that I use frequently.YorSubs– YorSubs2021-10-06 06:07:27 +00:00Commented Oct 6, 2021 at 6:07
- 
        1To me, needing a shell script debugger is something that implies you're doing debugging far too late in the process. It seems that employing an iterative way of writing shell scripts may be helpful to you. Don't expect to write a script that does what it's supposed to do, all at once. Instead, write an empty main loop and just make sure it iterates over the right things. Then add extraction of one piece of data, or whatever you need to do next, and make sure that bit works, testing after adding each new "feature" of the code.Kusalananda– Kusalananda ♦2021-10-06 09:56:32 +00:00Commented Oct 6, 2021 at 9:56
- 
        I do all that, to the extent that I can, but over time, things happen, time constraints, jumping between projects. Unfortunately, "life happens", and things creep in, so debugging something is required in those situations.YorSubs– YorSubs2021-10-06 11:26:21 +00:00Commented Oct 6, 2021 at 11:26
- 
        The issues you are describing in the first paragraph are typical of all programming languages, e.g. C. A missing round bracket will cause an error to be thrown many lines of codes later.dr_– dr_2021-10-06 12:39:22 +00:00Commented Oct 6, 2021 at 12:39
                    
                        
                    
                 | 
            
                Show 1 more comment
            
        
         
    How to Edit
        - Correct minor typos or mistakes
- Clarify meaning without changing it
- Add related resources or links
- Always respect the author’s intent
- Don’t use edits to reply to the author
        How to Format
    
    - 
                create code fences with backticks ` or tildes ~
                ```
 like so
 ```
- 
                add language identifier to highlight code
                ```python
 def function(foo):
 print(foo)
 ```
- put returns between paragraphs
- for linebreak add 2 spaces at end
- _italic_ or **bold**
- indent code by 4 spaces
- backtick escapes `like _so_`
- quote by placing > at start of line
- to make links (use https whenever possible)
                <https://example.com>[example](https://example.com)<a href="https://example.com">example</a>
            How to Tag
        
        A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.
- complete the sentence: my question is about...
- use tags that describe things or concepts that are essential, not incidental to your question
- favor using existing popular tags
- read the descriptions that appear below the tag
If your question is primarily about a topic for which you can't find a tag:
- combine multiple words into single-words with hyphens (e.g. shell-script), up to a maximum of 35 characters
- creating new tags is a privilege; if you can't yet create a tag you need, then post this question without it, then ask the community to create it for you
lang-bash