help-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnuwin32


From: Steve
Subject: gnuwin32
Date: 14 Oct 2006 05:05:10 -0700
User-agent: G2/1.0

Hi,

 Intro:

 I don't script a lot mainly because at work we're forced into the
 windows 2003, AD and XP mould which means putting up with the 'quirky'
 windows command shell (yes, quirky is a euphemism - I'll let you
decide
 what for).

 Prob:

 I've used xargs in past to pass piped command output into a subsequent
 command that doesn't normally accept parameters from the pipe (in
 debian linux)

 e.g.    command1 | xargs command2 *output from command 1*

 I wanted to set a variable to the output of a string of commands and
as
 windows shell won't allow
 set variable=`commands` I thought I'd use xargs as below.

 /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

 ok, I've run the above output (set pcip= 10.60.1.77) on the command
 line on its own and the variable is set.

 I'll work another solution out somehow, if not with xargs, but I'd
kind
 of like to understand what the problem is (actually understand not
just
 go - oh it's that quirky windows command shell).
 
 Thanks for any help and please excuse the long explanation.
 
 Steve



reply via email to

[Prev in Thread] Current Thread [Next in Thread]