Sed Cheat Sheet



sed is an extremely powerful stream editor. The web is full of useful sed one liners. Win poker for mac.

Traktor pro for mac os x. This post will be an ever growing list of sed one liners I have found useful.

Sed regex spaceSed

Find and Replace

Find and remove all instances of TEXT:

Linux/Unix Command Line Cheat Sheet. It provides a set of essential commands with a detailed description of how to do it. Linux Cheat Sheet. It gives general commands instruction on logging on to the Linux server, copying files to and from the server, directory commands, working with modules and programs, etc. CISSP & Security+ Cheat Sheet Symmetric – Performance Algorithm Cipher Type er ogly phics –First K nwn Ci er No Sc y tale (4 0 BC b he par ans) ransposition Caesar Mono- Substitution Vigenere Poly- Substitution Vernam (One Time Pad) – Used in W Iin the Ger manE ig XOR ES Lucifer (56 bits) Block 3DES (2 keys – 112 bits & 3 keys - 168. CISSP & Security+ Cheat Sheet. A sed onC sol and S r Business Continuity Plan risk and analysis business mp act n lysis strategic planning and mitigation training and awareness maintenance and audit Documentation and security labeling Virus replication mechanism.

Find and remove all spaces:

Cheat

Delete all blank lines from a file

Delete leading whitespace from front of each line

Sed

Delete trailing whitespace from end of each line

Delete leading and trailing whitespace from each line

Sed Cheat Sheet

Insert a line of text before a line

Change configuration file values

Change BRIDGE_HOTPLUG=yes to BRIDGE_HOTPLUG=no no matter what it is already set to:

Change PermitRootLogin no to PermitRootLogin yes no matter what it is already set to:

Wrap Value in Double Quotes

Change date=2015 to date='2015”:

Remove word wrap

Display links between href tags

Ed Text Editor

Lower case all href=”*” tags

Lower case all img src=”*” tags

Lower case all href=”” tags but exclude href='http” tags

Lower case all img src=”” tags but exclude img src='http” tags

Sed Pdf

Remove ‘%20’ only from lines matching href=”*”

Sed Regex Space

References





Comments are closed.