How do you cut a string after a specific character in Unix?

How do you cut a string after a specific character in Unix?
Answer
7 Answers
  1. what if the original string had more than one : character? Like
    [email protected]
    :administrators:/home/some/directory/file . …
  2. @SopalajodeArrierez, The given command will just work. See asciinema.org/a/16807 (because the .* will match as much as possible: greedy) – falsetru Feb 21 ’15 at 7:05.
23 авг. 2013 г.
 

Tìm kiếm

Back
Top