Question: I'm a bit useless at Linux CLI, and I am trying to run the following commands to randomly sort, then split a file with output file prefixes 'out' (one output file will have 50 lines, the other the rest):

```
sort -R somefile  | split -l 50 out

```

I get the error

```
split: cannot open ‘out’ for reading: No such file or directory

```

this is presumably because the third parameter of split should be its input file. How do I pass the result of the sort to split? TIA!!

Answer: 
`out` is interpreted as input file. You can should a single dash to indicate reading from `STDIN`:

`sort -R somefile | split - -l 50 out`
For POSIX systems like mac os the `-` parameter is not accepted and you need to completely omit the filename, and let it generate it's own names.

```
sort -R somefile | split -l 50

```