I have a list of files, which is given for instance by find . -name file.*
./file.a
./dir1/dir2/file.b
./dir1/dir3/file.c
./file.d
./file.e
...
How to automatically create variables as fallows:
F1=./file.a
F2=./dir1/dir2/file.b
F3=./dir1/dir3/file.c
F4=./file.d
F5=./file.e
...
I guess some smart combination of sed/awk/xargs will do the job.
Can you help me with that?
1 Answer