> which i thinkĀ  i can't store it in an array
> like this but i want the output as
> June.pdf April.pdf Aug.pdf Aug.pdf Feb.pdf Jan.pdf July.pdf June.pdf

Regarding the first question about using find, it should be '*.pdf'
and NOT "*.pdf" (read man page of find -- it states that if you use
double-quotes, bash expands it before parsing it to find).

Regarding array, the following will work for you.
$ i=`ls`; echo $i

I have used back ticks (the one on the tilde ~ key). You can even
iterate over them (following will work if there are no spaces in path
names).

$ for i in `ls`; do echo $i; done

(of course, this will sequentially print each item).


Sharad

-- 
LUG@IITD - http://lug-iitd.org/Footer

Reply via email to