[Solved] Use awk to find letters and print results [closed]

[ad_1]

I think you are looking for this:

awk '/^[JM]/{print $1,$2}' i_ve_got_an_vi_edirtor_with_some_collums.file

update

Now i need the same but only for students that the surname starts from [A-D]

awk '$2~/^[A-D]/{print $1,$2}' i_ve_got_an_vi_edirtor_with_some_collums.file

16

[ad_2]

solved Use awk to find letters and print results [closed]