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