Git Warning: LF Will Be Replaced by CRLF

I’m using Git Bash while writing this post. I’ve never tested the commands on *nix. Background Some of the tags and titles were written as “LateX”/“latex” in the source files. I batch corrected them with Git Grep and GNU Sed. git grep --name-only -IiE ^-\ latex$'\r'? content/{post,page} | \ xargs -n1 sed -i "s/^- latex/- LaTeX/I" I tried to match a leading - using ^- a whitespace \ escaped by a backslash to avoid wrapping the special character below with double quotes the string “latex” (case-insensitive) the carriage return \r, which is represented by $'\r' in bash, for at most once (? [Read More]
Git  sed 

Conditional Batch File Editing

Adopted Mmark for Math Posts

Problem During the adoption of Mmark for math posts on this blog, I had to insert markup: mmark at the last line of front matter of the source file of each math post. Seek help I separated this into two SO questions Sed conditional match and execute command with offset, and A question about AWK multiple line recognition. Solution From #1., I learnt the use of variables in AWK scripts. From #2, some users explained how these variables can be used for multi-line regex search. [Read More]
awk  sed  Mmark