Bash trivia question

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

 




Hi all,

Probably this isn't the right place to ask Bash questions.  But since this
might be of some relevance to Redhat users I'm posting the question here.

Consider the script below:

#=========================================
!/bin/bash

STRING_1="Value of string one"
STRING_2="Value of string two"
STRING_3="Value of string three"
STRING_4="Value of string four"

for i in ${!STRING*}; do
        echo "Variable is :: ${i}"        # output will be: Variable is ::
STRING_1, STRING_2 ... ... etc.
        echo "Value is :: <???>"        # output will be: Value is :: Value
of string one, Value of string two, ... ... etc.
done
#=========================================

My question is what should I write in the place of <???> ?


Thanks in advance for any clue or pointer to any site.

Regards,
irc




-- 
Psyche-list mailing list
Psyche-list@redhat.com
https://listman.redhat.com/mailman/listinfo/psyche-list

[Index of Archives]     [Fedora General Discussion]     [Red Hat General Discussion]     [Centos]     [Kernel]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat 9]     [Gimp]     [Yosemite News]

  Powered by Linux