Zero line supplements



  • Code number There are variables. They can be ambiguous and three-digit.

    busNumber=cat $dir/busnumdevNumber=cat $dir/devnum

    The implementation line shall take only three-digit values ./usbr "/dev/bus/usb/$busNumber/$devNumber"

    Show me how to make sure that if the variable is single-digit, it adds two zeros to it if the two-digit is one zero, if it's three-digit nothing.



  • About:

    /dev/bus/usb/`printf %03d $busNumber`/`printf %03d $devNumber`
    



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2