Re: Grep for colums?
Hi,
martin@localhost:~/2delete$ cat columns.txt
1 2 3
a b c
1 2 3 4
a b c d
martin@localhost:~/2delete$ awk '$2 == "b"' columns.txt
a b c
a b c d
martin@localhost:~/2delete$ awk '$2 == "2"' columns.txt
1 2 3
1 2 3 4
2009/2/11 Nagy Daniel <n.dani86@gmail.com>:
> Is there a methodfor searching in colums just like grep does in rows, but i
> don't know how many colums I will have, so: awk is not good, beacuse awk
> {print $1$2$3} it's not a good soultion:S i have too many colums
hmm I don't quite see the problem
--
http://soup.alt.delete.co.at
http://www.xing.com/profile/Martin_Marcher
http://www.linkedin.com/in/martinmarcher
You are not free to read this message,
by doing so, you have violated my licence
and are required to urinate publicly. Thank you.
Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html
Reply to: