diff --git a/.cirrus.yml b/.cirrus.yml index 7861b4071a..2ff51d75d7 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,5 +1,5 @@ freebsd_instance: - image_family: freebsd-13-2 + image_family: freebsd-14-2 task: install_script: pkg install -y wget git m4 bash autoconf automake sqlite3 gmake curl libarchive pcre2 bzip2 build_script: ./autogen.sh && ./configure && gmake -j3 diff --git a/NEWS.md b/NEWS.md index 8a8dad5787..ea5a8da4e6 100644 --- a/NEWS.md +++ b/NEWS.md @@ -77,6 +77,10 @@ Features: * A `stats.timeseries` PRQL function has been added to make it easier to perform an aggregation over buckets of time. +* Added the `:pipe-entry-to` command that pipes all + lines of the focused log message to the given shell + command, complementing `:pipe-to` (marked lines) and + `:pipe-line-to` (focused line). Breaking changes: * Mouse mode is disabled by default again since there diff --git a/docs/source/commands.rst b/docs/source/commands.rst index 98de0a205f..22b8db7ca3 100644 --- a/docs/source/commands.rst +++ b/docs/source/commands.rst @@ -73,6 +73,7 @@ an error message in the status bar, like so: - :code:`:open` - :code:`:pipe-to` - :code:`:pipe-line-to` + - :code:`:pipe-entry-to` - :code:`:redirecto-to` - :code:`:sh` - :code:`:write-*-to` diff --git a/src/cmds.io.cc b/src/cmds.io.cc index 21dabd07a5..f4eaac2e86 100644 --- a/src/cmds.io.cc +++ b/src/cmds.io.cc @@ -1954,10 +1954,12 @@ com_pipe_to(exec_context& ec, auto* tc = *lnav_data.ld_view_stack.top(); auto bv = combined_user_marks(tc->get_bookmarks()); bool pipe_line_to = (args[0] == "pipe-line-to"); + bool pipe_entry_to = (args[0] == "pipe-entry-to"); + bool pipe_focused = pipe_line_to || pipe_entry_to; auto path_v = ec.ec_path_stack; std::map extra_env; - if (pipe_line_to && tc == &lnav_data.ld_views[LNV_LOG]) { + if (pipe_focused && tc == &lnav_data.ld_views[LNV_LOG]) { log_data_helper ldh(lnav_data.ld_log_source); char tmp_str[64]; @@ -2053,7 +2055,7 @@ com_pipe_to(exec_context& ec, = ec.ec_pipe_callback(ec, cmdline, child_fds[1].read_end()); } - if (pipe_line_to) { + if (pipe_focused) { if (tc->get_inner_height() == 0) { // Nothing to do } else if (tc == &lnav_data.ld_views[LNV_LOG]) { @@ -2440,6 +2442,21 @@ static readline_context::command_t IO_COMMANDS[] = { .with_example({"To write the focused line to 'sed' for processing", "sed -e 's/foo/bar/g'"}), }, + { + "pipe-entry-to", + com_pipe_to, + + help_text(":pipe-entry-to") + .with_summary("Pipe all lines of the focused log message to the " + "given shell command. Any fields defined by the " + "format will be set as environment variables.") + .with_parameter( + help_text("shell-cmd", "The shell command-line to execute")) + .with_tags({"io"}) + .with_example({"To write the focused log message to 'sed' for " + "processing", + "sed -e 's/foo/bar/g'"}), + }, { "redirect-to", com_redirect_to, diff --git a/src/internals/cmd-ref.rst b/src/internals/cmd-ref.rst index c94590a485..f92806aadb 100644 --- a/src/internals/cmd-ref.rst +++ b/src/internals/cmd-ref.rst @@ -94,7 +94,7 @@ :append-to /tmp/interesting-lines.txt **See Also** - :ref:`dot_dump`, :ref:`dot_read`, :ref:`dot_save`, :ref:`echo`, :ref:`echoln`, :ref:`export_session_to`, :ref:`open`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`redirect_to`, :ref:`write_csv_to`, :ref:`write_json_cols_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`xopen` + :ref:`dot_dump`, :ref:`dot_read`, :ref:`dot_save`, :ref:`echo`, :ref:`echoln`, :ref:`export_session_to`, :ref:`open`, :ref:`pipe_entry_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`redirect_to`, :ref:`write_csv_to`, :ref:`write_json_cols_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`xopen` ---- @@ -306,7 +306,7 @@ * **path** --- A path or glob pattern that specifies the files to close **See Also** - :ref:`append_to`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`dot_save`, :ref:`echo`, :ref:`echoln`, :ref:`export_session_to`, :ref:`open`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`redirect_to`, :ref:`write_csv_to`, :ref:`write_json_cols_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`xopen` + :ref:`append_to`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`dot_save`, :ref:`echo`, :ref:`echoln`, :ref:`export_session_to`, :ref:`open`, :ref:`pipe_entry_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`redirect_to`, :ref:`write_csv_to`, :ref:`write_json_cols_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`xopen` ---- @@ -597,7 +597,7 @@ :echo Hello, World! **See Also** - :ref:`alt_msg`, :ref:`append_to`, :ref:`cd`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`dot_save`, :ref:`echoln`, :ref:`eval`, :ref:`export_session_to`, :ref:`export_session_to`, :ref:`external_access_login`, :ref:`external_access`, :ref:`open`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`redirect_to`, :ref:`sh`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_json_cols_to`, :ref:`write_json_cols_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`xopen` + :ref:`alt_msg`, :ref:`append_to`, :ref:`cd`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`dot_save`, :ref:`echoln`, :ref:`eval`, :ref:`export_session_to`, :ref:`export_session_to`, :ref:`external_access_login`, :ref:`external_access`, :ref:`open`, :ref:`pipe_entry_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`redirect_to`, :ref:`sh`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_json_cols_to`, :ref:`write_json_cols_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`xopen` ---- @@ -686,7 +686,7 @@ * **path\*** --- The path to the file to write **See Also** - :ref:`alt_msg`, :ref:`append_to`, :ref:`cd`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`dot_save`, :ref:`echo`, :ref:`echo`, :ref:`echoln`, :ref:`eval`, :ref:`external_access_login`, :ref:`external_access`, :ref:`open`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`redirect_to`, :ref:`sh`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_json_cols_to`, :ref:`write_json_cols_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`xopen` + :ref:`alt_msg`, :ref:`append_to`, :ref:`cd`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`dot_save`, :ref:`echo`, :ref:`echo`, :ref:`echoln`, :ref:`eval`, :ref:`external_access_login`, :ref:`external_access`, :ref:`open`, :ref:`pipe_entry_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`redirect_to`, :ref:`sh`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_json_cols_to`, :ref:`write_json_cols_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`xopen` ---- @@ -1163,7 +1163,7 @@ :open dean@host1.example.com:/var/log/syslog.log **See Also** - :ref:`append_to`, :ref:`close`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`dot_save`, :ref:`echo`, :ref:`echoln`, :ref:`export_session_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`redirect_to`, :ref:`write_csv_to`, :ref:`write_json_cols_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`xopen` + :ref:`append_to`, :ref:`close`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`dot_save`, :ref:`echo`, :ref:`echoln`, :ref:`export_session_to`, :ref:`pipe_entry_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`redirect_to`, :ref:`write_csv_to`, :ref:`write_json_cols_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`xopen` ---- @@ -1191,6 +1191,29 @@ ---- +.. _pipe_entry_to: + +:pipe-entry-to *shell-cmd* +^^^^^^^^^^^^^^^^^^^^^^^^^^ + + Pipe all lines of the focused log message to the given shell command. Any fields defined by the format will be set as environment variables. + + **Parameters** + * **shell-cmd\*** --- The shell command-line to execute + + **Examples** + To write the focused log message to 'sed' for processing: + + .. code-block:: lnav + + :pipe-entry-to sed -e 's/foo/bar/g' + + **See Also** + :ref:`append_to`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`dot_save`, :ref:`echo`, :ref:`echoln`, :ref:`export_session_to`, :ref:`open`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`redirect_to`, :ref:`write_csv_to`, :ref:`write_json_cols_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`xopen` + +---- + + .. _pipe_line_to: :pipe-line-to *shell-cmd* @@ -1209,7 +1232,7 @@ :pipe-line-to sed -e 's/foo/bar/g' **See Also** - :ref:`append_to`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`dot_save`, :ref:`echo`, :ref:`echoln`, :ref:`export_session_to`, :ref:`open`, :ref:`pipe_to`, :ref:`redirect_to`, :ref:`write_csv_to`, :ref:`write_json_cols_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`xopen` + :ref:`append_to`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`dot_save`, :ref:`echo`, :ref:`echoln`, :ref:`export_session_to`, :ref:`open`, :ref:`pipe_entry_to`, :ref:`pipe_to`, :ref:`redirect_to`, :ref:`write_csv_to`, :ref:`write_json_cols_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`xopen` ---- @@ -1232,7 +1255,7 @@ :pipe-to sed -e s/foo/bar/g **See Also** - :ref:`append_to`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`dot_save`, :ref:`echo`, :ref:`echoln`, :ref:`export_session_to`, :ref:`open`, :ref:`pipe_line_to`, :ref:`redirect_to`, :ref:`write_csv_to`, :ref:`write_json_cols_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`xopen` + :ref:`append_to`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`dot_save`, :ref:`echo`, :ref:`echoln`, :ref:`export_session_to`, :ref:`open`, :ref:`pipe_entry_to`, :ref:`pipe_line_to`, :ref:`redirect_to`, :ref:`write_csv_to`, :ref:`write_json_cols_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`xopen` ---- @@ -1358,7 +1381,7 @@ :redirect-to /tmp/script-output.txt **See Also** - :ref:`alt_msg`, :ref:`append_to`, :ref:`cd`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`dot_save`, :ref:`echo`, :ref:`echo`, :ref:`echoln`, :ref:`eval`, :ref:`export_session_to`, :ref:`export_session_to`, :ref:`external_access_login`, :ref:`external_access`, :ref:`open`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`rebuild`, :ref:`sh`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_json_cols_to`, :ref:`write_json_cols_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`xopen` + :ref:`alt_msg`, :ref:`append_to`, :ref:`cd`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`dot_save`, :ref:`echo`, :ref:`echo`, :ref:`echoln`, :ref:`eval`, :ref:`export_session_to`, :ref:`export_session_to`, :ref:`external_access_login`, :ref:`external_access`, :ref:`open`, :ref:`pipe_entry_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`rebuild`, :ref:`sh`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_json_cols_to`, :ref:`write_json_cols_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`xopen` ---- @@ -1857,7 +1880,7 @@ :write-table-to /tmp/table.txt **See Also** - :ref:`alt_msg`, :ref:`append_to`, :ref:`cd`, :ref:`create_logline_table`, :ref:`create_search_table`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`dot_save`, :ref:`echo`, :ref:`echo`, :ref:`echoln`, :ref:`eval`, :ref:`export_session_to`, :ref:`export_session_to`, :ref:`external_access_login`, :ref:`external_access`, :ref:`open`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`redirect_to`, :ref:`sh`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_json_cols_to`, :ref:`write_json_cols_to`, :ref:`write_json_cols_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`xopen` + :ref:`alt_msg`, :ref:`append_to`, :ref:`cd`, :ref:`create_logline_table`, :ref:`create_search_table`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`dot_save`, :ref:`echo`, :ref:`echo`, :ref:`echoln`, :ref:`eval`, :ref:`export_session_to`, :ref:`export_session_to`, :ref:`external_access_login`, :ref:`external_access`, :ref:`open`, :ref:`pipe_entry_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`redirect_to`, :ref:`sh`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_json_cols_to`, :ref:`write_json_cols_to`, :ref:`write_json_cols_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`xopen` ---- @@ -1881,7 +1904,7 @@ :write-csv-to /tmp/table.csv **See Also** - :ref:`alt_msg`, :ref:`append_to`, :ref:`cd`, :ref:`create_logline_table`, :ref:`create_search_table`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`dot_save`, :ref:`echo`, :ref:`echo`, :ref:`echoln`, :ref:`eval`, :ref:`export_session_to`, :ref:`export_session_to`, :ref:`external_access_login`, :ref:`external_access`, :ref:`open`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`redirect_to`, :ref:`sh`, :ref:`write_json_cols_to`, :ref:`write_json_cols_to`, :ref:`write_json_cols_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`xopen` + :ref:`alt_msg`, :ref:`append_to`, :ref:`cd`, :ref:`create_logline_table`, :ref:`create_search_table`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`dot_save`, :ref:`echo`, :ref:`echo`, :ref:`echoln`, :ref:`eval`, :ref:`export_session_to`, :ref:`export_session_to`, :ref:`external_access_login`, :ref:`external_access`, :ref:`open`, :ref:`pipe_entry_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`redirect_to`, :ref:`sh`, :ref:`write_json_cols_to`, :ref:`write_json_cols_to`, :ref:`write_json_cols_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`xopen` ---- @@ -1919,7 +1942,7 @@ :write-json-cols-to /tmp/table.json **See Also** - :ref:`alt_msg`, :ref:`append_to`, :ref:`cd`, :ref:`create_logline_table`, :ref:`create_search_table`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`dot_save`, :ref:`echo`, :ref:`echo`, :ref:`echoln`, :ref:`eval`, :ref:`export_session_to`, :ref:`export_session_to`, :ref:`external_access_login`, :ref:`external_access`, :ref:`open`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`redirect_to`, :ref:`sh`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`xopen` + :ref:`alt_msg`, :ref:`append_to`, :ref:`cd`, :ref:`create_logline_table`, :ref:`create_search_table`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`dot_save`, :ref:`echo`, :ref:`echo`, :ref:`echoln`, :ref:`eval`, :ref:`export_session_to`, :ref:`export_session_to`, :ref:`external_access_login`, :ref:`external_access`, :ref:`open`, :ref:`pipe_entry_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`redirect_to`, :ref:`sh`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`xopen` ---- @@ -1943,7 +1966,7 @@ :write-json-to /tmp/table.json **See Also** - :ref:`alt_msg`, :ref:`append_to`, :ref:`cd`, :ref:`create_logline_table`, :ref:`create_search_table`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`dot_save`, :ref:`echo`, :ref:`echo`, :ref:`echoln`, :ref:`eval`, :ref:`export_session_to`, :ref:`export_session_to`, :ref:`external_access_login`, :ref:`external_access`, :ref:`open`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`redirect_to`, :ref:`sh`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_json_cols_to`, :ref:`write_json_cols_to`, :ref:`write_json_cols_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`xopen` + :ref:`alt_msg`, :ref:`append_to`, :ref:`cd`, :ref:`create_logline_table`, :ref:`create_search_table`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`dot_save`, :ref:`echo`, :ref:`echo`, :ref:`echoln`, :ref:`eval`, :ref:`export_session_to`, :ref:`export_session_to`, :ref:`external_access_login`, :ref:`external_access`, :ref:`open`, :ref:`pipe_entry_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`redirect_to`, :ref:`sh`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_json_cols_to`, :ref:`write_json_cols_to`, :ref:`write_json_cols_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`xopen` ---- @@ -1968,7 +1991,7 @@ :write-jsonlines-to /tmp/table.json **See Also** - :ref:`alt_msg`, :ref:`append_to`, :ref:`cd`, :ref:`create_logline_table`, :ref:`create_search_table`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`dot_save`, :ref:`echo`, :ref:`echo`, :ref:`echoln`, :ref:`eval`, :ref:`export_session_to`, :ref:`export_session_to`, :ref:`external_access_login`, :ref:`external_access`, :ref:`open`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`redirect_to`, :ref:`sh`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_json_cols_to`, :ref:`write_json_cols_to`, :ref:`write_json_cols_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`xopen` + :ref:`alt_msg`, :ref:`append_to`, :ref:`cd`, :ref:`create_logline_table`, :ref:`create_search_table`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`dot_save`, :ref:`echo`, :ref:`echo`, :ref:`echoln`, :ref:`eval`, :ref:`export_session_to`, :ref:`export_session_to`, :ref:`external_access_login`, :ref:`external_access`, :ref:`open`, :ref:`pipe_entry_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`redirect_to`, :ref:`sh`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_json_cols_to`, :ref:`write_json_cols_to`, :ref:`write_json_cols_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`xopen` ---- @@ -1993,7 +2016,7 @@ :write-raw-to /tmp/table.txt **See Also** - :ref:`alt_msg`, :ref:`append_to`, :ref:`cd`, :ref:`create_logline_table`, :ref:`create_search_table`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`dot_save`, :ref:`echo`, :ref:`echo`, :ref:`echoln`, :ref:`eval`, :ref:`export_session_to`, :ref:`export_session_to`, :ref:`external_access_login`, :ref:`external_access`, :ref:`open`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`redirect_to`, :ref:`sh`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_json_cols_to`, :ref:`write_json_cols_to`, :ref:`write_json_cols_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`xopen` + :ref:`alt_msg`, :ref:`append_to`, :ref:`cd`, :ref:`create_logline_table`, :ref:`create_search_table`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`dot_save`, :ref:`echo`, :ref:`echo`, :ref:`echoln`, :ref:`eval`, :ref:`export_session_to`, :ref:`export_session_to`, :ref:`external_access_login`, :ref:`external_access`, :ref:`open`, :ref:`pipe_entry_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`redirect_to`, :ref:`sh`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_json_cols_to`, :ref:`write_json_cols_to`, :ref:`write_json_cols_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`xopen` ---- @@ -2017,7 +2040,7 @@ :write-screen-to /tmp/table.txt **See Also** - :ref:`alt_msg`, :ref:`append_to`, :ref:`cd`, :ref:`create_logline_table`, :ref:`create_search_table`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`dot_save`, :ref:`echo`, :ref:`echo`, :ref:`echoln`, :ref:`eval`, :ref:`export_session_to`, :ref:`export_session_to`, :ref:`external_access_login`, :ref:`external_access`, :ref:`open`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`redirect_to`, :ref:`sh`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_json_cols_to`, :ref:`write_json_cols_to`, :ref:`write_json_cols_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`xopen` + :ref:`alt_msg`, :ref:`append_to`, :ref:`cd`, :ref:`create_logline_table`, :ref:`create_search_table`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`dot_save`, :ref:`echo`, :ref:`echo`, :ref:`echoln`, :ref:`eval`, :ref:`export_session_to`, :ref:`export_session_to`, :ref:`external_access_login`, :ref:`external_access`, :ref:`open`, :ref:`pipe_entry_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`redirect_to`, :ref:`sh`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_json_cols_to`, :ref:`write_json_cols_to`, :ref:`write_json_cols_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`xopen` ---- @@ -2041,7 +2064,7 @@ :write-to /tmp/interesting-lines.txt **See Also** - :ref:`alt_msg`, :ref:`append_to`, :ref:`cd`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`dot_save`, :ref:`echo`, :ref:`echo`, :ref:`echoln`, :ref:`eval`, :ref:`export_session_to`, :ref:`export_session_to`, :ref:`external_access_login`, :ref:`external_access`, :ref:`open`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`redirect_to`, :ref:`sh`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_json_cols_to`, :ref:`write_json_cols_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`xopen` + :ref:`alt_msg`, :ref:`append_to`, :ref:`cd`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`dot_save`, :ref:`echo`, :ref:`echo`, :ref:`echoln`, :ref:`eval`, :ref:`export_session_to`, :ref:`export_session_to`, :ref:`external_access_login`, :ref:`external_access`, :ref:`open`, :ref:`pipe_entry_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`redirect_to`, :ref:`sh`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_json_cols_to`, :ref:`write_json_cols_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`xopen` ---- @@ -2065,7 +2088,7 @@ :write-view-to /tmp/table.txt **See Also** - :ref:`alt_msg`, :ref:`append_to`, :ref:`cd`, :ref:`create_logline_table`, :ref:`create_search_table`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`dot_save`, :ref:`echo`, :ref:`echo`, :ref:`echoln`, :ref:`eval`, :ref:`export_session_to`, :ref:`export_session_to`, :ref:`external_access_login`, :ref:`external_access`, :ref:`open`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`redirect_to`, :ref:`sh`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_json_cols_to`, :ref:`write_json_cols_to`, :ref:`write_json_cols_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_to`, :ref:`xopen` + :ref:`alt_msg`, :ref:`append_to`, :ref:`cd`, :ref:`create_logline_table`, :ref:`create_search_table`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`dot_save`, :ref:`echo`, :ref:`echo`, :ref:`echoln`, :ref:`eval`, :ref:`export_session_to`, :ref:`export_session_to`, :ref:`external_access_login`, :ref:`external_access`, :ref:`open`, :ref:`pipe_entry_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`redirect_to`, :ref:`sh`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_json_cols_to`, :ref:`write_json_cols_to`, :ref:`write_json_cols_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_to`, :ref:`xopen` ---- @@ -2088,7 +2111,7 @@ :xopen /path/to/file **See Also** - :ref:`append_to`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`dot_save`, :ref:`echo`, :ref:`echoln`, :ref:`export_session_to`, :ref:`open`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`redirect_to`, :ref:`write_csv_to`, :ref:`write_json_cols_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_view_to` + :ref:`append_to`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`dot_save`, :ref:`echo`, :ref:`echoln`, :ref:`export_session_to`, :ref:`open`, :ref:`pipe_entry_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`redirect_to`, :ref:`write_csv_to`, :ref:`write_json_cols_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_view_to` ---- diff --git a/src/internals/sql-ref.rst b/src/internals/sql-ref.rst index f125fc2a05..36eb846290 100644 --- a/src/internals/sql-ref.rst +++ b/src/internals/sql-ref.rst @@ -1260,7 +1260,7 @@ echoln(*value*) * **value\*** --- The value to write to the current output file **See Also** - :ref:`append_to`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`dot_save`, :ref:`echo`, :ref:`export_session_to`, :ref:`open`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`redirect_to`, :ref:`write_csv_to`, :ref:`write_json_cols_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`xopen` + :ref:`append_to`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`dot_save`, :ref:`echo`, :ref:`export_session_to`, :ref:`open`, :ref:`pipe_entry_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`redirect_to`, :ref:`write_csv_to`, :ref:`write_json_cols_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`xopen` ---- @@ -4813,7 +4813,7 @@ zeroblob(*N*) * **table** --- The name of the table to dump **See Also** - :ref:`append_to`, :ref:`dot_read`, :ref:`dot_save`, :ref:`echo`, :ref:`echoln`, :ref:`export_session_to`, :ref:`open`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`redirect_to`, :ref:`write_csv_to`, :ref:`write_json_cols_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`xopen` + :ref:`append_to`, :ref:`dot_read`, :ref:`dot_save`, :ref:`echo`, :ref:`echoln`, :ref:`export_session_to`, :ref:`open`, :ref:`pipe_entry_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`redirect_to`, :ref:`write_csv_to`, :ref:`write_json_cols_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`xopen` ---- @@ -4840,7 +4840,7 @@ zeroblob(*N*) * **path\*** --- The path to the file to write **See Also** - :ref:`append_to`, :ref:`dot_dump`, :ref:`dot_save`, :ref:`echo`, :ref:`echoln`, :ref:`export_session_to`, :ref:`open`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`redirect_to`, :ref:`write_csv_to`, :ref:`write_json_cols_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`xopen` + :ref:`append_to`, :ref:`dot_dump`, :ref:`dot_save`, :ref:`echo`, :ref:`echoln`, :ref:`export_session_to`, :ref:`open`, :ref:`pipe_entry_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`redirect_to`, :ref:`write_csv_to`, :ref:`write_json_cols_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`xopen` ---- @@ -4856,7 +4856,7 @@ zeroblob(*N*) * **path\*** --- The path to the file to write **See Also** - :ref:`append_to`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`echo`, :ref:`echoln`, :ref:`export_session_to`, :ref:`open`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`redirect_to`, :ref:`write_csv_to`, :ref:`write_json_cols_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`xopen` + :ref:`append_to`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`echo`, :ref:`echoln`, :ref:`export_session_to`, :ref:`open`, :ref:`pipe_entry_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`redirect_to`, :ref:`write_csv_to`, :ref:`write_json_cols_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`xopen` ---- diff --git a/test/expected/Makefile.am b/test/expected/Makefile.am index 7913707fd2..762b1bd5e2 100644 --- a/test/expected/Makefile.am +++ b/test/expected/Makefile.am @@ -184,6 +184,8 @@ dist_noinst_DATA = \ test_cmds.sh_5630626e6f68c3d4a2c3e5f27d024df5950b88b5.out \ test_cmds.sh_583e03bfd354014a46bb4bac5d3be680df97f08d.err \ test_cmds.sh_583e03bfd354014a46bb4bac5d3be680df97f08d.out \ + test_cmds.sh_59ec63a8dce36b7a5a6e3a47339b4983d54912c5.err \ + test_cmds.sh_59ec63a8dce36b7a5a6e3a47339b4983d54912c5.out \ test_cmds.sh_5bfd08c1639701476d7b9348c36afd46fdbe6f2a.err \ test_cmds.sh_5bfd08c1639701476d7b9348c36afd46fdbe6f2a.out \ test_cmds.sh_5d316a16c23059467b7749a69e71416ebb38e09d.err \ diff --git a/test/expected/test_cmds.sh_59ec63a8dce36b7a5a6e3a47339b4983d54912c5.err b/test/expected/test_cmds.sh_59ec63a8dce36b7a5a6e3a47339b4983d54912c5.err new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test/expected/test_cmds.sh_59ec63a8dce36b7a5a6e3a47339b4983d54912c5.out b/test/expected/test_cmds.sh_59ec63a8dce36b7a5a6e3a47339b4983d54912c5.out new file mode 100644 index 0000000000..2ab376cca1 --- /dev/null +++ b/test/expected/test_cmds.sh_59ec63a8dce36b7a5a6e3a47339b4983d54912c5.out @@ -0,0 +1,2 @@ +-07-20 22:59:27,672:DEBUG:Hello, Bork! + How are you today? diff --git a/test/expected/test_cmds.sh_b6a3bb78e9d60e5e1f5ce5b18e40d2f1662707ab.out b/test/expected/test_cmds.sh_b6a3bb78e9d60e5e1f5ce5b18e40d2f1662707ab.out index 1118b6f742..0592122745 100644 --- a/test/expected/test_cmds.sh_b6a3bb78e9d60e5e1f5ce5b18e40d2f1662707ab.out +++ b/test/expected/test_cmds.sh_b6a3bb78e9d60e5e1f5ce5b18e40d2f1662707ab.out @@ -765,10 +765,11 @@ For support questions, email: Parameter path The path to the file to append to See Also - .dump, .read, .save, :echo, :export-session-to, :open, :pipe-line-to, - :pipe-to, :redirect-to, :write-csv-to, :write-json-cols-to, - :write-json-to, :write-jsonlines-to, :write-raw-to, :write-screen-to, - :write-table-to, :write-to, :write-view-to, :xopen, echoln() + .dump, .read, .save, :echo, :export-session-to, :open, :pipe-entry-to, + :pipe-line-to, :pipe-to, :redirect-to, :write-csv-to, + :write-json-cols-to, :write-json-to, :write-jsonlines-to, + :write-raw-to, :write-screen-to, :write-table-to, :write-to, + :write-view-to, :xopen, echoln() Example #1 To append marked lines to the file {TMPDIR}interesting-lines.txt: :append-to {TMPDIR}interesting-lines.txt  @@ -901,7 +902,7 @@ For support questions, email: close See Also .dump, .read, .save, :append-to, :echo, :export-session-to, :open, - :pipe-line-to, :pipe-to, :redirect-to, :write-csv-to, + :pipe-entry-to, :pipe-line-to, :pipe-to, :redirect-to, :write-csv-to, :write-json-cols-to, :write-json-to, :write-jsonlines-to, :write-raw-to, :write-screen-to, :write-table-to, :write-to, :write-view-to, :xopen, echoln() @@ -1090,13 +1091,13 @@ For support questions, email: See Also .dump, .read, .save, :alt-msg, :append-to, :cd, :eval, :export-session-to, :export-session-to, :external-access, - :external-access-login, :open, :pipe-line-to, :pipe-to, :rebuild, - :redirect-to, :redirect-to, :sh, :write-csv-to, :write-csv-to, - :write-json-cols-to, :write-json-cols-to, :write-json-to, - :write-json-to, :write-jsonlines-to, :write-jsonlines-to, - :write-raw-to, :write-raw-to, :write-screen-to, :write-screen-to, - :write-table-to, :write-table-to, :write-to, :write-to, :write-view-to, - :write-view-to, :xopen, echoln() + :external-access-login, :open, :pipe-entry-to, :pipe-line-to, :pipe-to, + :rebuild, :redirect-to, :redirect-to, :sh, :write-csv-to, + :write-csv-to, :write-json-cols-to, :write-json-cols-to, + :write-json-to, :write-json-to, :write-jsonlines-to, + :write-jsonlines-to, :write-raw-to, :write-raw-to, :write-screen-to, + :write-screen-to, :write-table-to, :write-table-to, :write-to, + :write-to, :write-view-to, :write-view-to, :xopen, echoln() Example #1 To output 'Hello, World!': :echo Hello, World!  @@ -1160,9 +1161,9 @@ For support questions, email: path The path to the file to write See Also .dump, .read, .save, :alt-msg, :append-to, :cd, :echo, :echo, :eval, - :external-access, :external-access-login, :open, :pipe-line-to, - :pipe-to, :rebuild, :redirect-to, :redirect-to, :sh, :write-csv-to, - :write-csv-to, :write-json-cols-to, :write-json-cols-to, + :external-access, :external-access-login, :open, :pipe-entry-to, + :pipe-line-to, :pipe-to, :rebuild, :redirect-to, :redirect-to, :sh, + :write-csv-to, :write-csv-to, :write-json-cols-to, :write-json-cols-to, :write-json-to, :write-json-to, :write-jsonlines-to, :write-jsonlines-to, :write-raw-to, :write-raw-to, :write-screen-to, :write-screen-to, :write-table-to, :write-table-to, :write-to, @@ -1472,7 +1473,7 @@ For support questions, email: path The path to the file to open See Also .dump, .read, .save, :append-to, :close, :echo, :export-session-to, - :pipe-line-to, :pipe-to, :redirect-to, :write-csv-to, + :pipe-entry-to, :pipe-line-to, :pipe-to, :redirect-to, :write-csv-to, :write-json-cols-to, :write-json-to, :write-jsonlines-to, :write-raw-to, :write-screen-to, :write-table-to, :write-to, :write-view-to, :xopen, echoln() @@ -1500,6 +1501,25 @@ For support questions, email: +:pipe-entry-to shell-cmd +══════════════════════════════════════════════════════════════════════ + Pipe all lines of the focused log message to the given shell + command. Any fields defined by the format will be set as + environment variables. +Parameter + shell-cmd The shell command-line to execute +See Also + .dump, .read, .save, :append-to, :echo, :export-session-to, :open, + :pipe-line-to, :pipe-to, :redirect-to, :write-csv-to, + :write-json-cols-to, :write-json-to, :write-jsonlines-to, + :write-raw-to, :write-screen-to, :write-table-to, :write-to, + :write-view-to, :xopen, echoln() +Example +#1 To write the focused log message to 'sed' for processing: + :pipe-entry-to sed -e 's/foo/bar/g'  + + + :pipe-line-to shell-cmd ══════════════════════════════════════════════════════════════════════ Pipe the focused line to the given shell command. Any fields @@ -1508,9 +1528,10 @@ For support questions, email: shell-cmd The shell command-line to execute See Also .dump, .read, .save, :append-to, :echo, :export-session-to, :open, - :pipe-to, :redirect-to, :write-csv-to, :write-json-cols-to, - :write-json-to, :write-jsonlines-to, :write-raw-to, :write-screen-to, - :write-table-to, :write-to, :write-view-to, :xopen, echoln() + :pipe-entry-to, :pipe-to, :redirect-to, :write-csv-to, + :write-json-cols-to, :write-json-to, :write-jsonlines-to, + :write-raw-to, :write-screen-to, :write-table-to, :write-to, + :write-view-to, :xopen, echoln() Example #1 To write the focused line to 'sed' for processing: :pipe-line-to sed -e 's/foo/bar/g'  @@ -1524,9 +1545,10 @@ For support questions, email: shell-cmd The shell command-line to execute See Also .dump, .read, .save, :append-to, :echo, :export-session-to, :open, - :pipe-line-to, :redirect-to, :write-csv-to, :write-json-cols-to, - :write-json-to, :write-jsonlines-to, :write-raw-to, :write-screen-to, - :write-table-to, :write-to, :write-view-to, :xopen, echoln() + :pipe-entry-to, :pipe-line-to, :redirect-to, :write-csv-to, + :write-json-cols-to, :write-json-to, :write-jsonlines-to, + :write-raw-to, :write-screen-to, :write-table-to, :write-to, + :write-view-to, :xopen, echoln() Example #1 To write marked lines to 'sed' for processing: :pipe-to sed -e s/foo/bar/g  @@ -1612,12 +1634,12 @@ For support questions, email: See Also .dump, .read, .save, :alt-msg, :append-to, :cd, :echo, :echo, :eval, :export-session-to, :export-session-to, :external-access, - :external-access-login, :open, :pipe-line-to, :pipe-to, :rebuild, :sh, - :write-csv-to, :write-csv-to, :write-json-cols-to, :write-json-cols-to, - :write-json-to, :write-json-to, :write-jsonlines-to, - :write-jsonlines-to, :write-raw-to, :write-raw-to, :write-screen-to, - :write-screen-to, :write-table-to, :write-table-to, :write-to, - :write-to, :write-view-to, :write-view-to, :xopen, echoln() + :external-access-login, :open, :pipe-entry-to, :pipe-line-to, :pipe-to, + :rebuild, :sh, :write-csv-to, :write-csv-to, :write-json-cols-to, + :write-json-cols-to, :write-json-to, :write-json-to, + :write-jsonlines-to, :write-jsonlines-to, :write-raw-to, :write-raw-to, + :write-screen-to, :write-screen-to, :write-table-to, :write-table-to, + :write-to, :write-to, :write-view-to, :write-view-to, :xopen, echoln() Example #1 To write the output of lnav commands to the file {TMPDIR}script-output.txt: :redirect-to {TMPDIR}script-output.txt  @@ -1921,14 +1943,14 @@ For support questions, email: .dump, .read, .save, :alt-msg, :append-to, :cd, :create-logline-table, :create-search-table, :echo, :echo, :eval, :export-session-to, :export-session-to, :external-access, :external-access-login, :open, - :pipe-line-to, :pipe-to, :rebuild, :redirect-to, :redirect-to, :sh, - :write-json-cols-to, :write-json-cols-to, :write-json-cols-to, - :write-json-to, :write-json-to, :write-json-to, :write-jsonlines-to, - :write-jsonlines-to, :write-jsonlines-to, :write-raw-to, :write-raw-to, - :write-raw-to, :write-screen-to, :write-screen-to, :write-screen-to, - :write-table-to, :write-table-to, :write-table-to, :write-to, - :write-to, :write-view-to, :write-view-to, :write-view-to, :xopen, - echoln() + :pipe-entry-to, :pipe-line-to, :pipe-to, :rebuild, :redirect-to, + :redirect-to, :sh, :write-json-cols-to, :write-json-cols-to, + :write-json-cols-to, :write-json-to, :write-json-to, :write-json-to, + :write-jsonlines-to, :write-jsonlines-to, :write-jsonlines-to, + :write-raw-to, :write-raw-to, :write-raw-to, :write-screen-to, + :write-screen-to, :write-screen-to, :write-table-to, :write-table-to, + :write-table-to, :write-to, :write-to, :write-view-to, :write-view-to, + :write-view-to, :xopen, echoln() Example #1 To write SQL results as CSV to {TMPDIR}table.csv: :write-csv-to {TMPDIR}table.csv  @@ -1958,9 +1980,9 @@ For support questions, email: .dump, .read, .save, :alt-msg, :append-to, :cd, :create-logline-table, :create-search-table, :echo, :echo, :eval, :export-session-to, :export-session-to, :external-access, :external-access-login, :open, - :pipe-line-to, :pipe-to, :rebuild, :redirect-to, :redirect-to, :sh, - :write-csv-to, :write-csv-to, :write-csv-to, :write-json-to, - :write-json-to, :write-json-to, :write-jsonlines-to, + :pipe-entry-to, :pipe-line-to, :pipe-to, :rebuild, :redirect-to, + :redirect-to, :sh, :write-csv-to, :write-csv-to, :write-csv-to, + :write-json-to, :write-json-to, :write-json-to, :write-jsonlines-to, :write-jsonlines-to, :write-jsonlines-to, :write-raw-to, :write-raw-to, :write-raw-to, :write-screen-to, :write-screen-to, :write-screen-to, :write-table-to, :write-table-to, :write-table-to, :write-to, @@ -1982,14 +2004,14 @@ For support questions, email: .dump, .read, .save, :alt-msg, :append-to, :cd, :create-logline-table, :create-search-table, :echo, :echo, :eval, :export-session-to, :export-session-to, :external-access, :external-access-login, :open, - :pipe-line-to, :pipe-to, :rebuild, :redirect-to, :redirect-to, :sh, - :write-csv-to, :write-csv-to, :write-csv-to, :write-json-cols-to, - :write-json-cols-to, :write-json-cols-to, :write-jsonlines-to, - :write-jsonlines-to, :write-jsonlines-to, :write-raw-to, :write-raw-to, - :write-raw-to, :write-screen-to, :write-screen-to, :write-screen-to, - :write-table-to, :write-table-to, :write-table-to, :write-to, - :write-to, :write-view-to, :write-view-to, :write-view-to, :xopen, - echoln() + :pipe-entry-to, :pipe-line-to, :pipe-to, :rebuild, :redirect-to, + :redirect-to, :sh, :write-csv-to, :write-csv-to, :write-csv-to, + :write-json-cols-to, :write-json-cols-to, :write-json-cols-to, + :write-jsonlines-to, :write-jsonlines-to, :write-jsonlines-to, + :write-raw-to, :write-raw-to, :write-raw-to, :write-screen-to, + :write-screen-to, :write-screen-to, :write-table-to, :write-table-to, + :write-table-to, :write-to, :write-to, :write-view-to, :write-view-to, + :write-view-to, :xopen, echoln() Example #1 To write SQL results as JSON to {TMPDIR}table.json: :write-json-to {TMPDIR}table.json  @@ -2009,14 +2031,14 @@ For support questions, email: .dump, .read, .save, :alt-msg, :append-to, :cd, :create-logline-table, :create-search-table, :echo, :echo, :eval, :export-session-to, :export-session-to, :external-access, :external-access-login, :open, - :pipe-line-to, :pipe-to, :rebuild, :redirect-to, :redirect-to, :sh, - :write-csv-to, :write-csv-to, :write-csv-to, :write-json-cols-to, - :write-json-cols-to, :write-json-cols-to, :write-json-to, - :write-json-to, :write-json-to, :write-raw-to, :write-raw-to, - :write-raw-to, :write-screen-to, :write-screen-to, :write-screen-to, - :write-table-to, :write-table-to, :write-table-to, :write-to, - :write-to, :write-view-to, :write-view-to, :write-view-to, :xopen, - echoln() + :pipe-entry-to, :pipe-line-to, :pipe-to, :rebuild, :redirect-to, + :redirect-to, :sh, :write-csv-to, :write-csv-to, :write-csv-to, + :write-json-cols-to, :write-json-cols-to, :write-json-cols-to, + :write-json-to, :write-json-to, :write-json-to, :write-raw-to, + :write-raw-to, :write-raw-to, :write-screen-to, :write-screen-to, + :write-screen-to, :write-table-to, :write-table-to, :write-table-to, + :write-to, :write-to, :write-view-to, :write-view-to, :write-view-to, + :xopen, echoln() Example #1 To write SQL results as JSON Lines to {TMPDIR}table.json: :write-jsonlines-to {TMPDIR}table.json  @@ -2037,10 +2059,10 @@ For support questions, email: .dump, .read, .save, :alt-msg, :append-to, :cd, :create-logline-table, :create-search-table, :echo, :echo, :eval, :export-session-to, :export-session-to, :external-access, :external-access-login, :open, - :pipe-line-to, :pipe-to, :rebuild, :redirect-to, :redirect-to, :sh, - :write-csv-to, :write-csv-to, :write-csv-to, :write-json-cols-to, - :write-json-cols-to, :write-json-cols-to, :write-json-to, - :write-json-to, :write-json-to, :write-jsonlines-to, + :pipe-entry-to, :pipe-line-to, :pipe-to, :rebuild, :redirect-to, + :redirect-to, :sh, :write-csv-to, :write-csv-to, :write-csv-to, + :write-json-cols-to, :write-json-cols-to, :write-json-cols-to, + :write-json-to, :write-json-to, :write-json-to, :write-jsonlines-to, :write-jsonlines-to, :write-jsonlines-to, :write-screen-to, :write-screen-to, :write-screen-to, :write-table-to, :write-table-to, :write-table-to, :write-to, :write-to, :write-view-to, :write-view-to, @@ -2062,10 +2084,10 @@ For support questions, email: .dump, .read, .save, :alt-msg, :append-to, :cd, :create-logline-table, :create-search-table, :echo, :echo, :eval, :export-session-to, :export-session-to, :external-access, :external-access-login, :open, - :pipe-line-to, :pipe-to, :rebuild, :redirect-to, :redirect-to, :sh, - :write-csv-to, :write-csv-to, :write-csv-to, :write-json-cols-to, - :write-json-cols-to, :write-json-cols-to, :write-json-to, - :write-json-to, :write-json-to, :write-jsonlines-to, + :pipe-entry-to, :pipe-line-to, :pipe-to, :rebuild, :redirect-to, + :redirect-to, :sh, :write-csv-to, :write-csv-to, :write-csv-to, + :write-json-cols-to, :write-json-cols-to, :write-json-cols-to, + :write-json-to, :write-json-to, :write-json-to, :write-jsonlines-to, :write-jsonlines-to, :write-jsonlines-to, :write-raw-to, :write-raw-to, :write-raw-to, :write-table-to, :write-table-to, :write-table-to, :write-to, :write-to, :write-view-to, :write-view-to, :write-view-to, @@ -2086,10 +2108,10 @@ For support questions, email: .dump, .read, .save, :alt-msg, :append-to, :cd, :create-logline-table, :create-search-table, :echo, :echo, :eval, :export-session-to, :export-session-to, :external-access, :external-access-login, :open, - :pipe-line-to, :pipe-to, :rebuild, :redirect-to, :redirect-to, :sh, - :write-csv-to, :write-csv-to, :write-csv-to, :write-json-cols-to, - :write-json-cols-to, :write-json-cols-to, :write-json-to, - :write-json-to, :write-json-to, :write-jsonlines-to, + :pipe-entry-to, :pipe-line-to, :pipe-to, :rebuild, :redirect-to, + :redirect-to, :sh, :write-csv-to, :write-csv-to, :write-csv-to, + :write-json-cols-to, :write-json-cols-to, :write-json-cols-to, + :write-json-to, :write-json-to, :write-json-to, :write-jsonlines-to, :write-jsonlines-to, :write-jsonlines-to, :write-raw-to, :write-raw-to, :write-raw-to, :write-screen-to, :write-screen-to, :write-screen-to, :write-to, :write-to, :write-view-to, :write-view-to, :write-view-to, @@ -2109,13 +2131,13 @@ For support questions, email: See Also .dump, .read, .save, :alt-msg, :append-to, :cd, :echo, :echo, :eval, :export-session-to, :export-session-to, :external-access, - :external-access-login, :open, :pipe-line-to, :pipe-to, :rebuild, - :redirect-to, :redirect-to, :sh, :write-csv-to, :write-csv-to, - :write-json-cols-to, :write-json-cols-to, :write-json-to, - :write-json-to, :write-jsonlines-to, :write-jsonlines-to, - :write-raw-to, :write-raw-to, :write-screen-to, :write-screen-to, - :write-table-to, :write-table-to, :write-view-to, :write-view-to, - :xopen, echoln() + :external-access-login, :open, :pipe-entry-to, :pipe-line-to, :pipe-to, + :rebuild, :redirect-to, :redirect-to, :sh, :write-csv-to, + :write-csv-to, :write-json-cols-to, :write-json-cols-to, + :write-json-to, :write-json-to, :write-jsonlines-to, + :write-jsonlines-to, :write-raw-to, :write-raw-to, :write-screen-to, + :write-screen-to, :write-table-to, :write-table-to, :write-view-to, + :write-view-to, :xopen, echoln() Example #1 To write marked lines to the file {TMPDIR}interesting-lines.txt: :write-to {TMPDIR}interesting-lines.txt  @@ -2133,10 +2155,10 @@ For support questions, email: .dump, .read, .save, :alt-msg, :append-to, :cd, :create-logline-table, :create-search-table, :echo, :echo, :eval, :export-session-to, :export-session-to, :external-access, :external-access-login, :open, - :pipe-line-to, :pipe-to, :rebuild, :redirect-to, :redirect-to, :sh, - :write-csv-to, :write-csv-to, :write-csv-to, :write-json-cols-to, - :write-json-cols-to, :write-json-cols-to, :write-json-to, - :write-json-to, :write-json-to, :write-jsonlines-to, + :pipe-entry-to, :pipe-line-to, :pipe-to, :rebuild, :redirect-to, + :redirect-to, :sh, :write-csv-to, :write-csv-to, :write-csv-to, + :write-json-cols-to, :write-json-cols-to, :write-json-cols-to, + :write-json-to, :write-json-to, :write-json-to, :write-jsonlines-to, :write-jsonlines-to, :write-jsonlines-to, :write-raw-to, :write-raw-to, :write-raw-to, :write-screen-to, :write-screen-to, :write-screen-to, :write-table-to, :write-table-to, :write-table-to, :write-to, @@ -2154,7 +2176,7 @@ For support questions, email: path The path to the file to open See Also .dump, .read, .save, :append-to, :echo, :export-session-to, :open, - :pipe-line-to, :pipe-to, :redirect-to, :write-csv-to, + :pipe-entry-to, :pipe-line-to, :pipe-to, :redirect-to, :write-csv-to, :write-json-cols-to, :write-json-to, :write-jsonlines-to, :write-raw-to, :write-screen-to, :write-table-to, :write-to, :write-view-to, echoln() @@ -2722,7 +2744,7 @@ For support questions, email: value The value to write to the current output file See Also .dump, .read, .save, :append-to, :echo, :export-session-to, :open, - :pipe-line-to, :pipe-to, :redirect-to, :write-csv-to, + :pipe-entry-to, :pipe-line-to, :pipe-to, :redirect-to, :write-csv-to, :write-json-cols-to, :write-json-to, :write-jsonlines-to, :write-raw-to, :write-screen-to, :write-table-to, :write-to, :write-view-to, :xopen diff --git a/test/test_cmds.sh b/test/test_cmds.sh index 09b1620c3e..1fd2df2b46 100644 --- a/test/test_cmds.sh +++ b/test/test_cmds.sh @@ -495,6 +495,11 @@ run_cap_test ${lnav_test} -n \ -c ":pipe-line-to sed -e 's/World!/Bork!/g' -e 's/2009//g'" \ ${test_dir}/logfile_multiline.0 +run_cap_test ${lnav_test} -n \ + -c ":goto 0" \ + -c ":pipe-entry-to sed -e 's/World!/Bork!/g' -e 's/2009//g'" \ + ${test_dir}/logfile_multiline.0 + run_cap_test ${lnav_test} -n \ -c ":goto 0" \ -c ":pipe-line-to xargs echo \$cs_uri_stem \$sc_status - " \