[EMAIL PROTECTED] wrote:
> El Viernes, 14 de Octubre de 2005 19:52, David Fix escribió:
>
>> You bet. :) Just remember to change the -5 to whatever the length
>> of the command is that you're checking against. :)
>
> The number means the lenght of the string after the - right?
Correct... The length of the string you're comparing it to...
So, some examples:
------------
if [ ${i: -5} = "groff" ] ; then {do something} ; fi
if [ ${i: -4} = "bash" ] ; then {do something} ; fi
if [ ${i: -6} = "expect" ] ; then {do something} ; fi
if [ ${i: -3} = "tcl" ] ; then {do something} ; fi
------------
I don't know if these examples are all correct names, but it gives you the
general idea. :)
Dave
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page