awk

print part of a field with awk

I launch:
ss -atp | grep -vi state | awk ‘{ print $2" "$3" "$4" "$5" "$6 }’

output:
0 0 192.168.1.14:49254 92.222.106.156:http users:(("firefox-esr",pid=696,fd=95))

From …

awk match regex warning

I am trying to run this awk code on a macOS:
first_argument_open_quote = match(payload, /[‘\"]/);

and I am getting the following message:
warning: regexp escape sequence `\"’ is not a known regexp operator

I need to match a si…

extracting substrings with regex

I have the following file:
> cat hit.txt | head
gene.69778.3.0.p1
gene.65186.0.2.p1
chr11_pilon3.g961.t1
gene.3169.3.4.p1
chr11_pilon3.g3568.t1
gene.1708.8.0.p1
gene.41465.0.3.p1
chr04_pilon3.g11582.t1
gene.101930.0.1.p1
gene.93918.0.0….

delete file based on condition

Hii i have a directory that contain text file and the files are used for some calculation and it produces four column files
like 0.5000 -0.9650 6.6554 3.4228
when column 2 greater than zero and column 3 less than zero then i want to delete…