4

Tip #549   Splitting arguments with read

The 'read' command can be used to split arguments based on any arbitrary character using IFS:

$ echo 'a/bc/ de fg hi/j' | { IFS='/' read first second others; echo "$first"; echo "$second"; echo "$others"; }
a
bc
 de fg hi/j