diff --git a/bash-scripting/splitting-a-string-with-delimiter.md b/bash-scripting/splitting-a-string-with-delimiter.md new file mode 100644 index 0000000..49b3eba --- /dev/null +++ b/bash-scripting/splitting-a-string-with-delimiter.md @@ -0,0 +1,8 @@ +You can split a string with `cut`: + +``` +foo="hello-world-bye-world" +bar=$(echo $foo | cut -d"-" -f2) +echo $bar +# world +```