Question: I have two files, fisrt "file.txt" have few lines, next file: "output.txt is empty", examples:

```
    cat file.txt

Line1     x   i   12gb
Line2     x   u   13.7gb
Line3     x   q   4.3gb
Line4     x   t   33gb
Line5     f   t   29.04gb
Line6     f   t   38gb

```

```
cat output.txt

```

I need to grep lines only where size is greater than 30 and separate size, f.e. 29.04gb to 29.04 gb (with white char) but i have problem with my script (in awk):

```
#!/bin/bash

plik=file.txt
OUT=output.txt

awk '{if (30<=$2) print $1, $4}' $plik >$OUT

```

My output.txt file looks:

```
Line3 4.3gb
Line4 33gb
Line6 38gb

```

Can u tell me where is the problem with my awk line ?

Answer: 
With your shown samples, please try following.

```
awk '$NF+0>30' Input_file

```

Simply checking condition if last field(where +0 will take till digits only in it) is greater than 30, if this condition is TRUE then print that line.
I would do it following way using GNU `AWK`, let `file.txt` content be

```
Line1     x   i   12gb
Line2     x   u   13.7gb
Line3     x   q   4.3gb
Line4     x   t   33gb
Line5     f   t   29.04gb
Line6     f   t   38gb

```

then

```
awk '{$0=gensub(/([[:alpha:]]+$)/, " \\1", 1)}$4>=30{print $1, $4, $5}' file.txt

```

output

```
Line4 33 gb
Line6 38 gb

```

Explanation: I instruct AWK to look for letters (`[[:alpha:]]`) at end (`$`) of line and insert space before them, thus 4th column become number itself and 5th column `gb`, then when value in 4th column is less equal `30` I print 1st, 4th and 5th column.

*(tested in GNU Awk 5.0.1)*