Description
Remove literal backslash-LF continuations from a caller-established unquoted shell fragment; excludes shell parsing, quoted contexts and CRLF normalization.
Shell token meaning depends on quote context, escape syntax, parameter expansion, and the particular shell. A literal split or escape decoder can inspect text without evaluating it. Recognizing a token does not execute a command or reproduce every rule of a complete shell parser.
Remove literal backslash-LF continuations from a caller-established unquoted shell fragment; excludes shell parsing, quoted contexts and CRLF normalization.
When to use this tool
Use Parsing: Shell Back Slash Newline Token when you need to inspect the supported literal shell-related token or escape without evaluating it.
How to use the tool and how it works
- Enter text. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read result. Expand result to inspect the returned fields.
Remove every literal backslash followed by LF from text. Return continuedText and removedContinuations inside result.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| text | Supplied text under the stated token or offset convention. | Required. Text. Implementation limit: 8192 Unicode code points and 16384 UTF-16 code units. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| result | Object containing the calculated result members described below. | Required. Object. |
| result.continuedText | Continued Text | Calculated result member: string. |
| result.removedContinuations | Removed Continuations | Calculated result member: number. |
{
"input": {
"text": "a\\\nb"
},
"output": {
"result": {
"continuedText": "ab",
"removedContinuations": 1
}
}
} Limitations and assumptions
- This is an unconditional string replacement without lexical quote awareness. CRLF continuations, backslash sequences inside single quotes, and full shell continuation semantics are not handled, and no command is executed.
- Outputs are nested inside result. Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
Alternative or Complementary methods
Use a shell-aware lexer or parser for quote context, concatenated words, nested expansions, and complete command syntax. Preserve untrusted text as data when its role is inspection.
References
Similar or alternative tools
- Properties Continuation Odd Backslash Flag
Count consecutive trailing backslashes and return continued when the count is odd.
- Shell Single Quoted Token Boundary
Extract literal text after a shell single-quote opener and report whether the first closing quote ends the token.