Jump to content

Conditional structures: Difference between revisions

→‎{{header|Ed}}: Fix syntax and punctuation
(Add Ed conditionals)
(→‎{{header|Ed}}: Fix syntax and punctuation)
Line 2,505:
=={{header|Ed}}==
 
Note that ed, unlike more advanced [[Sed]], has no conditional branching. Still, conditionals can be simulated with global match/no-match rules:
 
<syntaxhighlight lang="bash">
g/True/s//It's true!/p
v/True/s/.*/It's false!/p
72

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.