Mar 12, 2009 #1 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
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
Mar 12, 2009 #2 feherke Programmer Aug 5, 2002 9,540 RO Hi Maybe this : Code: FILES="$( echo testa.* testb.* )" [gray]# or[/gray] FILES="$( echo test?.txt )" Feherke. http://rootshell.be/~feherke/ Upvote 0 Downvote
Hi Maybe this : Code: FILES="$( echo testa.* testb.* )" [gray]# or[/gray] FILES="$( echo test?.txt )" Feherke. http://rootshell.be/~feherke/
Mar 12, 2009 Thread starter #3 tekpr00 IS-IT--Management Jan 22, 2008 186 CA 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 Upvote 0 Downvote
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
Mar 12, 2009 Thread starter #4 tekpr00 IS-IT--Management Jan 22, 2008 186 CA I have been able to solve it by using FILES=`ls test?.txt` thanks Upvote 0 Downvote