Inserting Text in Files Using ANSI-C Quoting in OSX with sed

Luca Berton
5 min read3 days ago

When working with text files on OSX, the sed (stream editor) command proves to be a powerful tool for making automated edits. One common task involves inserting lines into specific positions within files. This article explores how to use sed with ANSI-C quoting to achieve this.

Introduction to sed

--

--

Luca Berton

I help creative Automation DevOps, Cloud Engineer, System Administrator, and IT Professional to succeed with Ansible Technology to automate more things everyday