Skip to content

acpmasquerade/sed-one-liners

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 

Repository files navigation

sed-one-liners

Case Conversion

Convert all characters to lowercase

sed 's/\(.*\)/\L\1/g' some-file.txt

Convert all characters to uppercase

sed 's/\(.*\)/\U\1/g' some-file.txt

Capitalize first word, making everything lowercase

sed 's/\(.\)\(.*\)/\U\1\L\2/g' some-file.txt

Capitalize first letter of each word

sed 's/\b\(.\)/\U\1/g' some-file.txt

Find patterns in the input

Find words and group them inside parenthesis

$ cat input.txt | sed 's/[A-Za-z]*/(&)/g'  
(The) (quick) (brown) (fox) (jumps) (over) (the) (lazy) (dog)

About

everyday useful collection of sed one liners

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published