Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write sed commands to convert chapter - level headers from AsciiDoc to Markdown format from Markdown to Org - Mode from Org - Mode to

Write sed commands to convert chapter-level headers
from AsciiDoc to Markdown format from Markdown to Org-Mode
from Org-Mode to AsciiDoc
The input is taken from a file containing one link per line, no other text. Thus, if a file f contains the following links
== Chapter header
== Not a chapter header
== Chapter with a = in the middle ==
== Chapter with =s at the end ====
## Chapter header
##
## Not a chapter header
## Chapter with a # in the middle ##
## Chapter with no #s at the end #####
** Chapter header
** Not a chapter header
** Chapter with stars at the end ****
**Not a chapter header
then the outputs should be
MYSTERY SEARCH-AND-REPLACE COMMAND AsciiDoc to Markdown< f
header
$ sed -E MAGICAL ## Chapter header == Not a chapter ## Chapter with a
= in the middle ## Chapter with =s at the end ====
## Chapter header ##
## Not a chapter header
## Chapter with a # in the middle ## ## Chapter with no #s at the end ##### ** Chapter header
** Not a chapter header
** Chapter with stars at the end ******Not a chapter header
MYSTERY SEARCH-AND-REPLACE COMMAND Markdown to Org-Mode< f
header
$ sed -E MAGICAL == Chapter header == Not a chapter == Chapter with a
= in the middle ==== Chapter with =s at the end ====
** Chapter header **
## Not a chapter header
** Chapter with a # in the middle
** Chapter with no #s at the end
** Chapter header
** Not a chapter header
** Chapter with stars at the end ******Not a chapter header
MYSTERY SEARCH-AND-REPLACE COMMAND Org-Mode to AsciiDoc< f
header
$ sed -E MAGICAL == Chapter header == Not a chapter == Chapter with a
= in the middle ==== Chapter with =s at the end ====
## Chapter header ##
## Not a chapter header
## Chapter with a # in the middle ## ## Chapter with no #s at the end ##### == Chapter header
** Not a chapter header
== Chapter with stars at the end ******Not a chapter header

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions