Entering edit mode
5.1 years ago
3335098459
▴
30
Hi,
I have multiple gene Ids or labels in a file. I want to use grep -f file.txt *.aln to find out in which alignment files my genes are present. I have tried grep --help and the -f switch is mentioned there. But the problem is: this command is not working in my linux system. Could anybody explain this? Is there any particular format required for this kind of command?
grep -f file.txt directory/path/*.aln
Regards
Awan
This is most uninformative => Why is it not working?
I don't know. Whenever I entered this command and pressed enter. The cursor moves to the next line but nothing happens. I mean no results are being shown.
Please show some effort, show data examples, show what is inside these files. How are we supposed to help without knowing details?
This means its still running. Are either of your files very large?
This souds most plausible. Also, grep is probably the slowest/most inefficient possible way to do this..
However, I have used a less algorithmic way. I have replaced all the spaces and tabs with -e and made a long command with all the labels having -e switch, the path to the directory and used grep. It worked fine. But still, I want to figure out this.
well, that is the answer then! whatever you are grepping in that file doesn't match anything in the given directory due to spectial symbols and so!