Question: I am trying to setup a script that uses the cat function to create File with Perl:PHP:C++:Python:COBOL:Ruby:Rails 

What i am trying to do it take this colon-separated list and output the items, one per line, to standard output (without colons)

```
#!/bin/bash
cat File
Perl:PHP:C++:Python:COBOL:Ruby:Rails
split (/:/)

```

I keep getting errors i'm probably just not using the split command properly

Answer: 
You don't need `split` for this. `split` is a tool for breaking up a file into smaller files based on a size threshold. It's not for breaking on a delimiter. But if you just want to output to standard output, here's a quick way:

```
$ cat > foo # Write one line to the new file `foo`
Perl:PHP:C++:Python:COBOL:Ruby:Rails 
$ IFS=: read -a langs < foo # Read the 1st line of the file into the array `langs`
                            # splitting on colon
$ printf '%s\n' "${langs[@]}" # Wordsplit the array into arguments to `printf`
Perl
PHP
C++
Python
COBOL
Ruby
Rails 

```

You could as easily just read the entire file with `$(<foo)`, but then you have to do some more sophisticated delimiter juggling:

```
$ splitByColon() { # Use a function to maintain scope
>   local IFS=: # Set the colon as the field separator just in this function
>   local -a langs=( $(<"$1") ) # Read the file into the array, split on colons
>   IFS=$'\n' # Prepare to output split by newlines 
>   echo "${langs[*]}"
> }
$ splitByColon foo

```
You might try

**`cat File | tr ':' '\n'`**

If you need to 'process' the items then something like: 

**`for MYVAR in $(cat File | tr ':' '\n') ; do echo ${MYVAR} ; done`**

:)  

Dale