Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pass 2 values to a variable

Status
Not open for further replies.

tekpr00

IS-IT--Management
Jan 22, 2008
186
CA
Hello, please help.

I have a directory
ls
testa.txt
testb.txt

I will like to pass both files to one variable in my script
#! /bin/sh

#enter files
FILES=testa.* ; testb.*
echo $FILES
exit

However, this little script gives me error. Please helo
 
Nope did not work..

Last line
echo $FILES displays "$( echo testa.* testb.* )"

I will like it to list testa.txt testb.txt as seperate files

Thanks
 
I have been able to solve it by using

FILES=`ls test?.txt`

thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top