4 ms·
Where does bash require a space in place of a tab? I've got 1000s of lines of scripts that start with #!/bin/bash and 100% use tab to indent.
by edoceo 10y ago
Where does bash require a space in place of a tab? I've got 1000s of lines of scripts that start with #!/bin/bash and 100% use tab to indent.
- dahart 10y agoIndented here-strings.
- edoceo 10y agoNope, those require tabs. See first result on Google for "bash indented here string" as well as bash guide.
- dahart 10y agoYes they do. You must indent the here-string with tabs and not spaces (which sucks for people who prefer spaces). If you want to indent within the here-string, bash requires spaces and not tabs. Mixed spaces and tabs are required to get both kinds of indentation at the same time. A very common use case for this would be help text / usage strings.