bash scripting sorry about the typo.
On Wed, Oct 30, 2013 at 10:16 AM, William Hermans <[email protected]> wrote: > There are even books out there just for bask scripting, some advanced some > intro. O'Reilley has at least one I am pretty sure > > Intro http://shop.oreilly.com/product/9781565923478.do > > solutions and examples http://shop.oreilly.com/product/9780596526788.do > > > On Wed, Oct 30, 2013 at 7:50 AM, rh_ <[email protected]> wrote: > >> Whenever I have to do bash I look at examples. Every linux OS has >> lots of bash scripts and provides good examples. >> >> On Wed, 30 Oct 2013 07:02:43 -0700 (PDT) >> Jason McMillon <[email protected]> >> wrote: >> >> > So I am the proud owner of a weather cape and beagle bone white and a >> > newb when it comes to bash scripting. >> > >> > Lets say I want to otput to the command line the relative humidity as >> > a percentage using a bash script. >> > >> > Getting the relative humidity is as easy as cat >> > /sys/bus/i2c/devices/1-0040/humidity1_input >> > >> > How do I assign this value to a variable in a bash script so that I >> > can manipulate it (specificall divide by 1000 to express as a >> > percentage)? >> > humidityInput=/sys/bus/i2c/devices/1-0040/humidity1_input >> > echo $humidityInput >> > >> > gives me /sys/bus/i2c/devices/1-0040/humidity1_input >> > >> > I have tried putting paranthesis, quotes, and single quotes around >> > "/sys/bus/i2c/devices/1-0040/humidity1_input" but can't get bash to >> > assign the value of the file to the variable. >> > >> > Any of you linux gurus want to help a new out? >> >> -- >> For more options, visit http://beagleboard.org/discuss >> --- >> You received this message because you are subscribed to the Google Groups >> "BeagleBoard" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
