Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 0 down vote accepted

Put them in an array.

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
... That didn't help. Just use the array. – Ignacio Vazquez-Abrams Nov 25 '10 at 11:57

Your Answer


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.