i have a bash code, and i need list the files of a path and save in a file
processVerification(){
ls $1 > testFiles
}
and in the folder i have the files
transaction-2012-01-20.csv
transaction-2012-01-21.csv
transaction-2012-01-22.csv
transaction-2012-01-23.csv
transaction-2012-01-24.csv
transaction-2013-01-24.csv
transaction-2013-02-24.csv
when i call processVerification folder=/home/folder/transactions-2012* command="cat" processVerification $folder $command
$ cat testFiles
I have Only transaction-2012-01-20.csv and i need all files.
But i need only the transactions of 2012 and i create processVerification because i need pass 50 distinct folders and the command is because in some folders i have .csv and in others i have .csv.bz2 and in others i have .csv.gz
and the files in each folder are distinct