Re: [LAD] [ot] capitalising words in a shell-script

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Chris Cannam <cannam@...>
Cc: Linux-Audio-Dev <linux-audio-dev@...>
Date: Friday, September 26, 2008 - 11:02 am

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
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-dev

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[LAD] [ot] capitalising words in a shell-script, Julien Claassen, (Fri Sep 26, 10:12 am)
Re: [LAD] [ot] capitalising words in a shell-script, Steve Harris, (Fri Sep 26, 10:47 am)
Re: [LAD] [ot] capitalising words in a shell-script, Paul Davis, (Fri Sep 26, 10:54 am)
Re: [LAD] [ot] capitalising words in a shell-script, Chris Cannam, (Fri Sep 26, 10:56 am)
Re: [LAD] [ot] capitalising words in a shell-script, Julien Claassen, (Fri Sep 26, 11:02 am)
Re: [LAD] [ot] capitalising words in a shell-script, Wolfgang Woehl, (Fri Sep 26, 10:07 pm)
Re: [LAD] [ot] capitalising words in a shell-script, Emanuel Rumpf, (Fri Sep 26, 11:11 pm)
Re: [LAD] [ot] capitalising words in a shell-script, Wolfgang Woehl, (Fri Sep 26, 11:19 pm)
Re: [LAD] [ot] capitalising words in a shell-script, Emanuel Rumpf, (Fri Sep 26, 11:27 pm)
Re: [LAD] [ot] capitalising words in a shell-script, Wolfgang Woehl, (Fri Sep 26, 11:32 pm)
Re: [LAD] [ot] capitalising words in a shell-script, Jens M Andreasen, (Fri Sep 26, 10:26 pm)
Re: [LAD] [ot] capitalising words in a shell-script, Wolfgang Woehl, (Fri Sep 26, 10:48 pm)
Re: [LAD] [ot] capitalising words in a shell-script, Jens M Andreasen, (Fri Sep 26, 11:07 pm)
Re: [LAD] [ot] capitalising words in a shell-script, Wolfgang Woehl, (Fri Sep 26, 11:27 pm)
Re: [LAD] [ot] capitalising words in a shell-script, Julien Claassen, (Fri Sep 26, 11:11 pm)
Re: [LAD] [ot] capitalising words in a shell-script, Jens M Andreasen, (Fri Sep 26, 11:35 pm)
Re: [LAD] [ot] capitalising words in a shell-script, Luis Garrido, (Fri Sep 26, 11:42 pm)
Re: [LAD] [ot] capitalising words in a shell-script, Julien Claassen, (Fri Sep 26, 11:48 pm)
Re: [LAD] [ot] capitalising words in a shell-script, Julien Claassen, (Fri Sep 26, 11:39 pm)
Re: [LAD] [ot] capitalising words in a shell-script, Chris Cannam, (Fri Sep 26, 10:59 am)
Re: [LAD] [ot] capitalising words in a shell-script, Markus Schwarzenberg, (Fri Sep 26, 10:46 am)