Skip to main content
better example that does not have the same word twice
Source Link
sk8asd123
  • 1.7k
  • 16
  • 14
$ echo 'hello:world:hello'again' |sed 's/:.*//'
hello
$ echo 'hello:world:hello' |sed 's/:.*//'
hello
$ echo 'hello:world:again' |sed 's/:.*//'
hello
Source Link
sk8asd123
  • 1.7k
  • 16
  • 14

$ echo 'hello:world:hello' |sed 's/:.*//'
hello