Skip to content

Commit

Permalink
Merge pull request #4045 from zackse/ez/fix-overview-cli-csv-examples
Browse files Browse the repository at this point in the history
CLI overview: fix CSV examples
  • Loading branch information
szarnyasg authored Nov 13, 2024
2 parents f205482 + affaffe commit a901294
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/api/cli/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ COPY (SELECT 42 AS woot UNION ALL SELECT 43 AS woot) TO 'test.csv' (HEADER);
First, read a file and pipe it to the `duckdb` CLI executable. As arguments to the DuckDB CLI, pass in the location of the database to open, in this case, an in-memory database, and a SQL command that utilizes `/dev/stdin` as a file location.

```bash
cat test.csv | duckdb "SELECT * FROM read_csv('/dev/stdin')"
cat test.csv | duckdb -c "SELECT * FROM read_csv('/dev/stdin')"
```

| woot |
Expand All @@ -271,7 +271,7 @@ To write back to stdout, the copy command can be used with the `/dev/stdout` fil

```bash
cat test.csv | \
duckdb "COPY (SELECT * FROM read_csv('/dev/stdin')) TO '/dev/stdout' WITH (FORMAT 'csv', HEADER)"
duckdb -c "COPY (SELECT * FROM read_csv('/dev/stdin')) TO '/dev/stdout' WITH (FORMAT 'csv', HEADER)"
```

```csv
Expand Down
4 changes: 2 additions & 2 deletions docs/archive/1.0/api/cli/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ COPY (SELECT 42 AS woot UNION ALL SELECT 43 AS woot) TO 'test.csv' (HEADER);
First, read a file and pipe it to the `duckdb` CLI executable. As arguments to the DuckDB CLI, pass in the location of the database to open, in this case, an in-memory database, and a SQL command that utilizes `/dev/stdin` as a file location.

```bash
cat test.csv | duckdb "SELECT * FROM read_csv('/dev/stdin')"
cat test.csv | duckdb -c "SELECT * FROM read_csv('/dev/stdin')"
```

| woot |
Expand All @@ -271,7 +271,7 @@ To write back to stdout, the copy command can be used with the `/dev/stdout` fil

```bash
cat test.csv | \
duckdb "COPY (SELECT * FROM read_csv('/dev/stdin')) TO '/dev/stdout' WITH (FORMAT 'csv', HEADER)"
duckdb -c "COPY (SELECT * FROM read_csv('/dev/stdin')) TO '/dev/stdout' WITH (FORMAT 'csv', HEADER)"
```

```csv
Expand Down

0 comments on commit a901294

Please sign in to comment.