unix - How to use cut command to shorten a file name, and use it inside a bash script? -
i use text of variable, fileroot, input command. however, fileroot based upon name of file in same directory.
so far, have
for file in *on.nii; fileroot="cut -c 1-78 ${file}" done
i getting unrecognised option -c command. ideas on how limit {file}
78 characters?
simply address string, instead of using cut
:
for file in *on.nii; fileroot="${file:0:78}" done
Comments
Post a Comment