<!-- Add the related story/sub-task/bug number, like Resolves #123, or remove if NA --> **Related issue:** Resolves #35548 # Checklist for submitter If some of the following don't apply, delete the relevant line. - [x] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. See [Changes files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files) for more information. - [x] Added/updated automated tests - [x] QA'd all new/changed functionality manually (QAed on macOS) ## fleetd/orbit/Fleet Desktop - [x] Verified compatibility with the latest released version of Fleet (see [Must rule](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/workflows/fleetd-development-and-release-strategy.md)) - [x] Verified that fleetd runs on macOS, Linux and Windows (Not manually checked, but this change should not impact it)
23 lines
704 B
YAML
23 lines
704 B
YAML
name: file_lines
|
|
notes: See also `file_contents` for reading the entire contents of a file as a single row. This table is from the [Mac Admins osquery extension](https://github.com/macadmins/osquery-extension).
|
|
description: Allows reading an arbitrary file. Each line of the file is returned as a separate row.
|
|
platforms:
|
|
- darwin
|
|
- windows
|
|
- linux
|
|
evented: false
|
|
examples: |-
|
|
Output the content of `/etc/hosts` line by line.
|
|
|
|
```
|
|
SELECT * FROM file_lines WHERE path='/etc/hosts';
|
|
```
|
|
columns:
|
|
- name: path
|
|
description: Path of the file to read.
|
|
required: true
|
|
type: text
|
|
- name: line
|
|
description: Output of the file, line by line.
|
|
required: false
|
|
type: text |