need to pick out files which are not of zero bytes

I need a scriptto print only those files from a list of files starting with STMT* which are not of zero bytes ...i.e they have some size

if these are the files
631
-rw-r--r-- 1 assrisa assrisa 39099 Aug 19 07:16 STMT_05_D1090819_T071320
-rw-r--r-- 1 assrisa assrisa 0 Aug 19 07:21 STMT15022_05_D1090819_T071
637
-rw-r--r-- 1 assrisa assrisa 0 Aug 19 07:46 STMT_05_D1090819_T074311
-rw-r--r-- 1 assrisa assrisa 0 Aug 19 07:51 STMT15022_05_D1090819_T07

the output should be STMT_05_D1090819_T071320

To keep the forums high quality for all users, please take the time to format your posts correctly.

First of all, use Code Tags when you post any code or data samples so others can easily read your code. You can easily do this by highlighting your code and then clicking on the # in the editing menu. (You can also type code tags

```text
 and 
```

by hand.)

Second, avoid adding color or different fonts and font size to your posts. Selective use of color to highlight a single word or phrase can be useful at times, but using color, in general, makes the forums harder to read, especially bright colors like red.

Third, be careful when you cut-and-paste, edit any odd characters and make sure all links are working property.

Thank You.

The UNIX and Linux Forums

*****************************************************

Is this list generated from a find or ls? If yes you might want to optimize that find.
Else you can do something like this:

$> awk '$5 != "0" && $NF ~ /^STMT_05_D1090819_T071320$/ {print}' infile
-rw-r--r-- 1 assrisa assrisa 39099 Aug 19 07:16 STMT_05_D1090819_T071320

Hi,

 
$find . -name "STMT*" ! -empty -exec ls -ltr {} \;
-rw-r--r--    1 scripter     scripterworld        401 Aug 19 21:47 ./STMT_1
 
$ find . -name "STMT*"  -empty -exec ls -ltr {} \;
-rw-r--r--    1 scripter     scripterworld        0 Aug 19 21:47 ./STMT_2

find command empty option displays files with zero bytes So using not " ! " symbol ,we will get files with some size :slight_smile: