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