I have several files in a directory like:
data1.dat data2.dat .... data24678.dat
To run another code, I need to have a text file with the names of the files but I need to split in 50 files per text file, like: File1.txt :
/PATH/OF/FILE/data1.data /PATH/OF/FILE/data2.data /PATH/OF/FILE/data3.data ...... /PATH/OF/FILE/data50.data
/PATH/OF/FILE/data51.data /PATH/OF/FILE/data52.data /PATH/OF/FILE/data53.data ...... /PATH/OF/FILE/data100.data
any idea?? I was trying like:
ls -1 | xargs -n 50 >> File1.txt
but I don't know who to select each "item" in the xargs command. Thanks!!