FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.

» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux General Discussion

LinkBack Thread Tools
Old 06-09-2010, 02:21 AM
Andres P
Default Rewrite early RTC device creation

On Tue, Jun 8, 2010 at 9:23 PM, Dan McGee <dpmcgee@gmail.com> 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

Thread Tools

All times are GMT. The time now is 04:33 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org