On Apr 3, 2007, at 4:26 PM, Mark Post wrote:

On Tue, Apr 3, 2007 at  5:14 PM, in message
<[EMAIL PROTECTED]
>, Marcy
Cortes <[EMAIL PROTECTED]> wrote:
Hey cool. It worked.  Thanks Mark.
I replaced the other 1: line with this line below.

But it doesn't have the little line in the console that makes us feel
all warm and fuzzy that the service finished booting correctly:
That is "Welcome to SUSE LINUX Enterprise Server 9 (s390x) -  Kernel
2.6.5- 7.283- s390x"

Any idea how I can keep that there?

You can create /root/.bashrc and put this in it:
#!/bin/sh
echo "Welcome to `head -n1 /etc/SuSE-release` - Kernel `uname -r`"

YOU TOO CAN HELP STAMP OUT BACKTICKS IN OUR LIFETIME.

Seriously, folks.  It's Linux, not Solaris: /bin/sh is POSIX-
compliant (boy, was I surprised last week when some of my POSIX
scripts barfed-and-died on.

So:

#!/bin/sh
echo "Welcome to $(head -n1 /etc/SuSE-release) - Kernel $(uname -r)"

No, it doesn't make much difference here.  But $() is nestable, and
backticks are not without very careful escaping, and they make the
logical grouping of the command line much, much clearer.  You also
don't have to escape embedded double quotes with $() command
substitution.  It's a good habit to cultivate.

Adam

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to