BreadCrumbs: Sed Command
Sed Command
From Luke Jackson
(Difference between revisions)
Revision as of 23:20, 5 December 2007 (edit) Ljackson (Talk | contribs) (→Examples) ← Previous diff |
Revision as of 23:21, 5 December 2007 (edit) Ljackson (Talk | contribs) (→Examples) Next diff → |
||
Line 1: | Line 1: | ||
== Examples == | == Examples == | ||
- | Remove all characters except digits: | + | Remove all characters except digits. Replace all characters except digits with null.: |
echo "m31uk3_1184329500.jpg" | sed 's/[^[:digit:]]//g' | echo "m31uk3_1184329500.jpg" | sed 's/[^[:digit:]]//g' |
Revision as of 23:21, 5 December 2007
Examples
Remove all characters except digits. Replace all characters except digits with null.:
echo "m31uk3_1184329500.jpg" | sed 's/[^[:digit:]]//g'