article in Tech
programming
SED - stream editor
Sed - An Introduction and Tutorial by Bruce Barnett
Resuming from mid-way through an import from(Ben Nolan - Big MySql Imports)
cat dump.sql | sed -n -e '/`some_table_name`/,$p' | mysql --init-command="SET foreign_key_checks = 0;" database_name
To delete/skip the empty/blank lines: sed '/^$/d' inputFile
To delete/skip the lines that are empty or contain only spaces:sed '/^[[:space:]]*$/d' inputFile
To delete/skip the lines starts with #: sed '/^#/d' inputFile
To delete/skip the lines where the very first non-space character is #: sed '/^[[:space:]]*#/d' inputFile
Remove html tags: sed 's/<[^>]\+>//g'
command line - How to use sed to replace only the first occurrence in a file? - Stack Overflow
Created: 2012-01-14 18:31:27
Modified: 2013-07-10 02:22:32