-
Notifications
You must be signed in to change notification settings - Fork 273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TaskfMRILevel2.v?.0.sh - Contrasts with whitespaces in titles #45
Comments
If you want to generate a pull request we can accept it. |
I'm not convinced that the proposed change will actually work as expected. The
This selects the "second field" from the lines in the
Assigning the results of this
The value of the Assigning a value to
counts the number of space separated words in the
would count the number of lines in the I've tested this by finding one of the
Using I believe the use of the I think the best viable solution would be to simply not allow spaces in your contrast names. Following the example above, you could replace the spaces with either underscores, I may be missing something here, but I'd be curious to see the value of |
I wondered about that but I'm glad you tested it. We could still use his suggestion if we ensured that the new lines are not converted to spaces with quotes. |
The white spaces remain an issue for contrasts generated by FIR designs (contrast names are automatically generated with white spaces) like using wc -c gives double the number of contrasts. |
Using this construct instead might resolve this issue, but would need to be tested (and if there are any blank lines, that may throw it off):
Note, wc -c counts the number of bytes, and will give far more than double the desired answer. Reopening, as this appears to have been closed too soon in the first place. |
Also, the reason that just adding quotes around ContrastNames should work is that bash converts newlines to spaces when expanding a variable without quoting, and even a simple |
Tim, your suggestion did indeed fix it but as you say, probably needs to be tested further. |
I had problems with NumContrasts being wrongly set in TaskfMRILevel2.v?.sh. The problem was that I had spaces in my contrast names. The easy solution is to replace "wc -w" with "wc -l" in the calculation in those scripts.
Thanks -
Richard Watts, University of Vermont
The text was updated successfully, but these errors were encountered: