On Thursday 28 December 2006 12:41, Randall R Schulz wrote: > On Wednesday 27 December 2006 16:09, Jeffery Fernandez wrote: > > ... > > > > cool idea.. I made it a bit more dynamic with the following: > > > > #!/bin/bash > > powered=`cat /etc/SuSE-release | head -n 1` > > We need to nip these "cat piped to" things in the bud. Here's the more > succint, more efficient equivalent: > > powered="$(head -n 1 /etc/SuSE-release)"
Thanks Randall :) Jeffery > > > Very few command-line programs read only from the standard input, not > accepting a file name, and in those cases, you just want to use > ordinary "less-than" redirection: > > variable="$(commandThatOnlyReadsStandardInput < fileName)" > > > ... > > Randall Schulz -- Powered by openSUSE 10.2 (i586) Kernel: 2.6.18.2-34-default KDE: 3.5.5 "release 45" 1:35pm up 2 days 14:26, 4 users, load average: 0.41, 1.07, 1.29 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
