Question: Is it possible to force LS to print output without line breaks? I need output without formatting. I tried to use --format=horizontal switch but it still puts lf signs. Maybe formatting only with spaces?

Answer: 
You can print files without line breaks and spaces instead, but notice that a filename can contain a space. That file would then be treated as two files. If you want to loop trough files in a script, you should prefer that:

```
for f in *; do
  echo "$f";
  # further processing
done

```

If is must be with spaces instead of line breaks use that command:

```
ls -1 | tr '\n' ' '

```

The `-1` flag forces `ls` to print *one* file per line. `tr` replaces the newlines with spaces.
or use `printf "$f ";` if you need it without line break