Results 1 - 10 of about 10
Substitution
Substitution Basic Substitution Simple Global Targetted Conditioned Substitution Simplified Advanced Bloc Advanced The substitute...
May  8, 2009Operating Systems > Linux > Shell > Sed
Capitalize the 1st letter of each word
Capitalize the 1st letter of each word Below are two ways to proceed: Method 1 sed-r 's /(^.|.) / \ U & / g' Method 2 sed 's / ^. \ |...
Feb 22, 2009Operating Systems > Linux > Shell > Sed
Tips and tricks
Tips and tricks Substitution Display Remove Miscellaneous Substitution Substitute "foo" with "bar" on each line Only the 1st occurrence...
Feb 22, 2009Operating Systems > Linux > Shell > Sed
[Sed] Delete one or more lines from a file
[Sed] Delete one or more lines from a file Removing one (or several) line (s) of a file Syntax: sed '{[/]<n>|<string>|<regex>[/]}d'...
Jan 12, 2009Operating Systems > Linux > Shell > Sed
Inserting a space between each letter
Inserting a space between each letter Insert a space between each letter. $ echo -e "hello life\nand hello to you" | sed 's/./& /g' h...
Jan 12, 2009Operating Systems > Linux > Shell > Sed
Inserting text in a file
Inserting text in a file Introduction Syntax Introduction It is sometimes useful to insert text in the header of one or more document...
Jan 12, 2009Operating Systems > Linux > Shell > Sed
Converting DOS /UNIX and vice-versa
Converting DOS /UNIX and vice-versa Intro Conversion DOS to UNIX / UNIX to DOS Conversion from DOS to UNIX Conversion from UNIX to DOS...
Dec 28, 2008Operating Systems > Linux > Shell > Sed
Set the first letter of a word in capital
Set the first letter of a word/phrase in capital Gsed 4.0 and higher sed 's/^./\u&/' Example : $ echo "how are you" | sed 's/^./\u&/'...
Nov 17, 2008Operating Systems > Linux > Shell > Sed
Numbering lines
Sed - Numbering lines Numbering lines (equat to "cat -n file.txt") sed = file.txt The problem is that the display is effected on 2...
Nov 17, 2008Operating Systems > Linux > Shell > Sed
Sed - inserting spaces
Sed - inserting spaces Insert a blank line after each sentence (punctuated by a carriage return) sed G file.txt Insert a blank line...
Nov 15, 2008Operating Systems > Linux > Shell > Sed