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)"


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
-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to