Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how to search in a file and replace in awk remotely?

21 views
Skip to first unread message

Aurélien DESBRIÈRES

unread,
Oct 2, 2016, 4:25:19 AM10/2/16
to
Hi,
The awk book speak about remote capacity of AWK.
How search and replace in a file remotely?
Thanks

Janis Papanagnou

unread,
Oct 2, 2016, 6:12:27 AM10/2/16
to
On 02.10.2016 10:25, Aurélien DESBRIÈRES wrote:
> Hi,
> The awk book speak about remote capacity of AWK.

What "The awk book" are you talking about?

If you refering to GNU awk and its manual, and specifically in GNU awk's
network programming capabilities then you should understand this statement:

"In addition to being able to open a two-way pipeline to a coprocess on the
same system (see Two-way I/O), it is possible to make a two-way connection
to another _process_ on another system across an IP network connection."

> How search and replace in a file remotely?

Directly you can't. You need a dedicated process on the remote machine which
is able to access the [remote] file system to operate on the file. Then you
can use GNU awk's network programming to communicate with that process.

<off-topic>
Depending on your system inftrastructure and its network it might be easier
to make the remote file system direct accessible to your local system. But
that depends on how your network and systems have been set up and on the OS.

Another option is to use a remote shell (or similar methods, depending on
the OS) and start the awk instance remotely in that shell on the distant
system.
</off-topic>

Janis

> Thanks
>

0 new messages