I'm new to writing scripts. Any help is appreciated!
I'm trying to pull values from each of my subjects. Each subject has their own directory. In their directory is a csv file with blood pressure values that I want to pull and save into a new csv file.
The csv is set up like this
    1     2     3     4   
    3.5   4.0   3.0   5.0 
I want the script to find the numbers "1" "3" and "4" and copy the values associated with them and save it to a new csv file in my working directory.
I found a script that does something similar:
    awk -F "\"*,\"*" '{print $2}' textfile.csv
but how do I get it to find the directory that the csv file is in?
I would like to run this for multiple subjects at once, with the new csv data like this:
    SUBJECT01   3.5   3.0  4.0 
    SUBJECT02   4.0   2.0  6.0
    SUBJECT03   6.0   5.0  7.0
Thanks in advance for any help/advice.