Hello friends! I am working a Psychology/Neuro* project where I am sorting inline citations by category. The final step of the process has me a little stuck. I need to take citations from a text list and sort them in another text file.
Here is a file X example
---------------------------------------------------------------------------------------
Another study found that among patients with schizophrenia, the greater the amount of D2 receptor activation in the prefrontal cortex, the greater the cognitive impairment (Meyer-Lindenberg et al., 2002)
Schizophrenia is associated with lower than normal release of glutamate and fewer than normal receptors in the prefrontal cortex and hippocampus (Akbarian et al., 1995;Ibrahim et al., 2000; Tsai et al., 1995).
PCP is Chapter 15 Mood Disorders and Schizophrenia is an interesting model for schizophrenia in other regards also (Farber, Newcomer, & Olney, 1999; Olney & Farber, 1995)
----------------------------
This is file Y before running the script:
schizophrenia
D2
prefrontal
impairment
hippocampus
PCP
------------------------
schizophrenia
Another study found that among patients with schizophrenia, the greater the amount of D2 receptor activation in the prefrontal cortex, the greater the cognitive impairment (Meyer-Lindenberg et al., 2002)
Schizophrenia is associated with lower than normal release of glutamate and fewer than normal receptors in the prefrontal cortex and hippocampus (Akbarian et al., 1995;Ibrahim et al., 2000; Tsai et al., 1995).
PCP is Chapter 15 Mood Disorders and Schizophrenia is an interesting model for schizophrenia in other regards also (Farber, Newcomer, & Olney, 1999; Olney & Farber, 1995)
D2
Another study found that among patients with schizophrenia, the greater the amount of D2 receptor activation in the prefrontal cortex, the greater the cognitive impairment (Meyer-Lindenberg et al., 2002)
prefrontal
Another study found that among patients with schizophrenia, the greater the amount of D2 receptor activation in the prefrontal cortex, the greater the cognitive impairment (Meyer-Lindenberg et al., 2002)
Schizophrenia is associated with lower than normal release of glutamate and fewer than normal receptors in the prefrontal cortex and hippocampus (Akbarian et al., 1995;Ibrahim et al., 2000; Tsai et al., 1995).
impairment
Another study found that among patients with schizophrenia, the greater the amount of D2 receptor activation in the prefrontal cortex, the greater the cognitive impairment (Meyer-Lindenberg et al., 2002)
hippocampus
Schizophrenia is associated with lower than normal release of glutamate and fewer than normal receptors in the prefrontal cortex and hippocampus (Akbarian et al., 1995;Ibrahim et al., 2000; Tsai et al., 1995).
PCP
PCP is Chapter 15 Mood Disorders and Schizophrenia is an interesting model for schizophrenia in other regards also (Farber, Newcomer, & Olney, 1999; Olney & Farber, 1995)
---------------------------------------------------------------------------------------
Trying to figure it out through google results, I made this mess ;
awk /X.txt/ '{ print; print grep <word++> -R -Hn Y.txt; next }1'
Thank you everyone even if you only read this.