Skip to content

Commit 4692496

Browse files
authored
Merge pull request #213 from noborus/ps-output
Input for ps output changed to recommend `-iwidth`
2 parents 7156b40 + f2e03f7 commit 4692496

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

README.md

+5-13
Original file line numberDiff line numberDiff line change
@@ -265,13 +265,13 @@ trdsql -q test.sql
265265
"`-`" or "`stdin`" is received from standard input instead of file name.
266266

267267
```console
268-
ps | trdsql -id " " "SELECT * FROM -"
268+
cat test.csv | trdsql "SELECT * FROM -"
269269
```
270270

271271
or
272272

273273
```console
274-
ps | trdsql -id " " "SELECT * FROM stdin"
274+
cat test.csv | trdsql "SELECT * FROM stdin"
275275
```
276276

277277
### 4.2. <a name='multiple-files'></a>Multiple files
@@ -645,7 +645,9 @@ PID,TTY,TIME,CMD
645645
733213,pts/3,00:00:00,guesswidth
646646
```
647647

648-
`-id " "` doesn't recognize well when there are spaces in the column.
648+
`-id " "` for `CSV` also works in many cases.
649+
But `-id " "` does not recognize spaces in columns very well.
650+
649651
`-iwidth` recognizes column widths and space separators.
650652

651653
### 4.14. <a name='raw-output'></a>Raw output
@@ -734,16 +736,6 @@ Melon,2
734736
Apple,3
735737
```
736738

737-
"- ih" sets the first line to column name
738-
739-
```console
740-
$ ps |trdsql -ih -oh -id " " "SELECT \`PID\`, \`TTY\`, \`TIME\`, \`CMD\` FROM -"
741-
TIME,TTY,PID,CMD
742-
00:00:00,pts/20,3452,ps
743-
00:00:00,pts/20,3453,trdsql
744-
00:00:05,pts/20,15576,zsh
745-
```
746-
747739
Note: the available functions and their syntax depend on the driver you have chosen (mysql or postgres or sqlite). The default one is sqlite.
748740

749741
### 4.18. <a name='join'></a>JOIN

0 commit comments

Comments
 (0)