Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

how i can write bash file to Find files (number and name of files are variable) inside the folder and save the file names in variables ?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Put them in an array.

files=(*)
share|improve this answer
    
but how i can find it (search about it) inside the folder then i will save it –  Mohammad AL-Rawabdeh Nov 25 '10 at 11:16
    
... What does that even mean? –  Ignacio Vazquez-Abrams Nov 25 '10 at 11:17
    
bash to proccess all files example for what bash do ? folder x contain 5 files bash search fild file no.1 and save name of it in variable y=no.1 ... this bash finshed its work when visit all files –  Mohammad AL-Rawabdeh Nov 25 '10 at 11:56
1  
... That didn't help. Just use the array. –  Ignacio Vazquez-Abrams Nov 25 '10 at 11:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.