[LAD] [ot] capitalising words in a shell-script
Julien Claassen
julien at c-lab.de
Fri Sep 26 11:02:19 UTC 2008
Hi!
Thank you all! I managed. there is something I didn't think of, which is,
that you can output only part of shell-variables. Now it looks like this:
VAR="Monday"
tmp_first=`echo "${VAR:0:1}" | tr 'a-z' 'A-Z'`
tmp_rest=`echo "${VAR:1}"
tmp_rest_short=`echo "${VAR:1:2}"`
var_long="$tmp_first$tmp_rest"
var_short="$tmp_first$tmp_rest_short"
echo "$var_long var_short"
Monday Mon
Splendid!
Thanks again for the tr-hint, that brought me onto it.
Kindest regards
Julien
--------
Music was my first love and it will be my last (John Miles)
======== FIND MY WEB-PROJECT AT: ========
http://ltsb.sourceforge.net
the Linux TextBased Studio guide
======= AND MY PERSONAL PAGES AT: =======
http://www.juliencoder.de
More information about the Linux-audio-dev
mailing list