Re: gnuwin32

[email protected] (Paul Jarc)
Newsgroups gmane.comp.gnu.utils
Organization What did you have in mind? A short, blunt, human pyramid?
Message-ID <[email protected]>
"Steve" <[email protected]> wrote:
>  /CODE/
>
>  >ping -n 1 whrcsdp05922 | awk "/TTL/ {print $3}" | awk -F: "{print
> $1}" | xargs --verbose set pcip=
>
>  /ENDCODE/
>
>  The result is:
>
>  set pcip= 10.60.1.77
>  xargs: set: No such file or directory

set is a command shell builtin, and xargs can only run external
commands.  Something like this might work:

ping -n 1 whrcsdp05922 |
awk "/TTL/ {print $3}" |
awk -F: "{print \"set pcip=\" $1}" |
cmd

Of course, the variable will be set only in that invocation of cmd, so
whatever depends on the variable should probably be included in the
commands written by the second awk.


paul
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.