1. Home
  2. Bash
  3. Examples
  4. Split a string on a delimiter

Brief: This tutorial will help you understand how to split a string based on a specified delimiter.

Use linux cut command to split a string based on specified delimeter. Use delimeter with -d command line option as below.

Output:

/root
Was this article helpful to you? Yes 1 No