Thanks! Following is the full script. BTW, I got another error if using the full path of surface data, please look at the end.
wf="/media/vpp/DATA/"
s=sbj05
thesession=pre
thecond='restingEyeClosed'
cd ${wf}/${s}/anat/surface_info/surf/
3dVol2Surf -spec ${wf}/${s}/anat/surface_info/SUMA/${s}_lh.spec \
-surf_A smoothwm \
-surf_B pial \
-sv ${wf}/${s}/${thesession}/result_$thecond/${s}_surf_volm_aligned+orig \
-grid_parent ${wf}/${s}/${thesession}/result_$thecond/r06_detrend.nii.gz \
-map_func nzave \
-f_steps 10 \
-f_index nodes \
-outcols_NSD_format \
-out_niml ${wf}/${s}/${thesession}/${thecond}/${s}_lvol2surf.niml.dset
## with full path
-surf_A ${wf}/${s}/anat/surface_info/surf/smoothwm \
-surf_B ${wf}/${s}/anat/surface_info/surf/pial \
** surface name '/media/vpp/DATA/sbj05/anat/surface_info/surf/smoothwm' not found
but the dataset lh.smoothwm, rh.smoothwm, lh.smoothwm.asc, rh.smoothwm.asc are all in surf directory.
.