[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: OT: How to match a substring?



Jan Minar wrote:

On Wed, Jan 14, 2004 at 11:59:12AM -0600, Kent West wrote:
This oughtta be simple for your scripters out there . . .


The script follows:

#!/bin/sh
case "$(uname -a | awk '{print $1}')" in
 Linux)
   echo "Hi, I'm Linus Torvalds & I pronounce Linux as Linux."
   ;;
 Solaris)
   echo "Hi, I'm Steven Soderbergh & I pronounce Solaris as Solaris."
   ;;
 *)
   echo "Hi, I don't know who I am & I can't even spell \`\`potato''."
   ;;
esac


Thanks! Good info.

--
Kent



Reply to: