Hi guys can you please help me with a script to find files with one row/1 line of content then move the file to another directory my script below runs but nothing happens to the files....Alternatively Ca I get a script to find the *.csv files with "wc -1" results = 1 then create a list of those filenames then move the files in the list to a different folder
from=/optima/prd/optdir/testbsc/dist/to=/optima/prd/optdir/testbsc/dist_old/for file in $from/*.do if [ -f $file ] ; then if [ $(cat $file | wc -l) -eq 1] ; then bname=$(basename $file) mv $file $to/$bname fi fidone