It gives me this message: awk: program limit exceeded: maximum number of fields size=32767
• 0 views
•
link
Hello everyone, I have a mydata.ped file, made up of 10215 rows (individuals) that looks like this:
1 MAL-005 0 0 1 1 3 3 4 4
2 MAL-006 0 0 3 3 1 1 4 4
3 MAL-007 1 1 0 0 1 3 4 4
4 MAL-008 1 1 0 1 1 3 3 4
Now, on bash, I need to check if the word "MAL-007" is present in the second column of mydata.ped file, and if yes, I want a script that prints "yes". Can anyone help me? Thank you.
cat my.ped | cut -f 2 | grep -q "MAL-007"
if [ $? -eq 0 ]
then
echo "yes"
fi
Log in to answer this question.
another awk solution: