On 7/14/06, Anthony Wright <[EMAIL PROTECTED]> wrote:

X=%k; X=${X#usbdev}; B=${X%%.*} D=${X#*.}; echo bus/usb/$B/$D
    produces
bus/usb/1/2

Thus the smallest change is the third version adding the two ;'s. This
behaviour seems fairly consistant across a number of versions of busybox
including the most recent stable version and the current development
version. I'm tempted to say this is a bug in busybox's shell so I'll
post there, but I'd still suggest making the change to the udev rules to
cover all the angles.

That makes sense. Basically, it's saying that you can't reference the
new value of a variable within the same command. What you've written
is more robust. Sorry, I'm keeping the shell commands (with the above
fixes) as it's less expensive than two piped sed's. I can't control if
Busybox wants to make a shell that's not compatible with standard
shells. (I actually don't know the Bourne/POSIX rules, so I can't
technically say who's right and wrong there.)

--
Dan
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to