> For the complete documentation index, see [llms.txt](https://notes.eliasnorrby.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://notes.eliasnorrby.com/bash/less-without-wrap.md).

# Parsing output with long lines using less

Output from commands that generate very long lines (e.g. tables produced by `docker` or `kubectl`) can be hard to parse when lines are wrapped. We can pipe their output to `less` using the `-S` or `--chop-long-lines` flag to have the lines be truncated instead of wrapped. The arrow keys can be used to view parts of lines that don't fit on the screen.

```bash
kubectl get pods -o wide | less -S
```

Source: `man less`
