Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Aug 2000 18:51:15 -0500
From:      Jon Hamilton <hamilton@pobox.com>
To:        Tom Parquette <tparquet@twcny.rr.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Shell script question 
Message-ID:  <20000825235115.77D01137@woodstock.monkey.net>
In-Reply-To: Your message of "Fri, 25 Aug 2000 17:25:23 EDT." <39A6E442.31FAE22E@twcny.rr.com> 

next in thread | previous in thread | raw e-mail | index | archive | help

In message <39A6E442.31FAE22E@twcny.rr.com>, Tom Parquette wrote:
} I just started to play with shell scripts because I got tired of running
} upstairs to see if some long running 'thing' was done.
} 
} My first attempt, which I got working, automates the custom kernel
} build.
} One problem:
} I have to enter the kernel name twice, once lower case and the other
} upper case.
} 
} I do not have any books on shell scrips so please excuse the sans-RTFM
} question.
} 
} Is there something that will uppercase a variable?  Possibly putting the
} value in another variable?

Sure, nothing to it:

VAR=yourvar
UPPERVAR=$(echo $VAR | tr [:lower:] [:upper:])

Shell scripting is fairly easy, it's learning the other tools that are
available (that you call from inside shell scripts) that takes a lot of 
perserverance.

-- 
   Jon Hamilton  
   hamilton@pobox.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000825235115.77D01137>