[argyllcms] Re: argyll v0.60.2 usb assignments

  • From: Caspar Maessen <cmaessen@xxxxxxxxxxxxxx>
  • To: argyllcms@xxxxxxxxxxxxx
  • Date: Sat, 18 Nov 2006 16:29:40 +0100

Op zaterdag 18 november 2006 06:25, schreef Graeme Gill:

Thanks for your answer. It is good to hear that I am on the right track 
with my explanation. This kind of excercises help me to understand the 
use of Linux e.a.

  > It's using the printf utility, which operates like the standard C
  > printf(),
Right, I only looked at man printf(1). Apparantly I missed printf(3). 
Looking at it, it would indeed have given me enough clues to find this 
out myself. A double lesson learned!

  > so the format expression %03i is for integer, 3 digits 
  > with leading '0's, creating the '004' and '004'.
  >
  > Another approach I've come across doesn't use printf:
  >
  > PROGRAM="/bin/sh -c 'X=%k; X=$${X#usbdev}; B=$${X%%%%.*};
  > D=$${X#*.}; echo bus/usb/$$B/$$D'"
This looks more like a solution I would have come up with. But the 
printf is a nice one, which I will explore more in my future 
scripting-adventures

  >
  > So it seems like this problem solved (for the moment!).
Yes indeed, and I'm glad I could be of help to you.

By the way the IT8.7/2 targets I ordered just arrived. So the rest of 
the weekend will be well spend on experimenting with your programs. 

Caspar.
-- 
Leadership: 1. Never assume a damn thing; 2. Prepare relentlessly; 3. I 
am responsible; 4. Surround yourself with great people. --Rudolph W. 
Guiliani, Leadership (2005)

Other related posts: