chyyuu / os_kernel_lab

OS kernel labs based on Rust/C Lang & RISC-V 64/X86-32
https://rcore-os.github.io/rCore-Tutorial-Book-v3/index.html
GNU General Public License v3.0
3.96k stars 1.92k forks source link

Mac Compatibility Issue For 'expr substr' #76

Closed Hughshine closed 4 years ago

Hughshine commented 4 years ago

grade.sh uses expr substr to cut string, which cannot be use in macos. This problem exists from lab5 to lab8 (also in the corresponding lab_result folder), which can be solved by change one line into this

# example code in lab5, grade.sh, line 256
select=`echo $1 | cut -c 2-${#1}`

Just a notice :-) .