Tr

From Wiki
Revision as of 18:00, 20 April 2011 by Scott (talk | contribs) (Created page with '{{lowercase title}} Count the number of slashes in a string: <pre> echo "/incoming/data/" | tr -dc '/' | wc -c </pre>')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Count the number of slashes in a string:

echo "/incoming/data/" | tr -dc '/' | wc -c