Re: [arch-dev-public] [RFC] Rewrite early RTC device creation

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



On Tue, Jun 8, 2010 at 9:23 PM, Dan McGee <dpmcgee@xxxxxxxxx> wrote:
> We can also just do some bash string manipulation and leave sed out of
> the picture:
>
> devnum=$(cat /sys/class/rtc/rtc0/dev)
> /bin/mknod /dev/rtc0 c ${devnum/:/ }
>

Since you're already using a ${foo/bar/baz} bashism, that's a useless
use of cat:
	devnum=$(< /sys/class/rtc/rtc0/dev)

And the subshell is also unnecesary:
	read -r devnum < /sys/class/rtc/rtc0/dev

The second one is posix...

Andres P


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux