I have a directory with a few dozens of files. I would like to do something with every second file from this directory. By now I only used find command but with thi
find
for file in `find dir -type f | awk 'NR % 2 == 0'`; do echo $file done
NR is the current row number. To get odd rows, use ... == 1.
NR
... == 1