[Top][All Lists]

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

Re: a question about {} of xargs

From: Paul Jarc
Subject: Re: a question about {} of xargs
Date: Fri, 18 Feb 2005 12:01:47 -0500
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.4 (gnu/linux)

<address@hidden> wrote:
> echo 0x04abcdef|xargs -i printf "%x\n"
> (({}-0x043000000)

I assume that was supposed to be "$(({}-0x043000000))".  The problem
with that is that bash processes the arithmetic expansion before
invoking xargs.  Try this:
echo 0x04abcdef | xargs -i bash -c 'printf "%x\n" "$(({}-0x043000000))"'

news:comp.unix.shell is a good place to find help with writing


reply via email to

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