在wsl 上运行window的R代码
#!/bin/bash
#/mnt/c/'Program Files'/R/R-4.4.1/bin/x64/Rscript.exe /mnt/e/yyp/code/KEGGscript.R
/mnt/c/Windows/System32/cmd.exe
/mnt/c/'Program Files'/R/R-4.4.1/bin/x64/Rscript.exe /mnt/e/yyp/code/KEGGscript.R
(R4) zhulab@DESKTOP-574GPKI:/mnt/e/yyp/code$ /mnt/c/'Program Files'/R/R-4.4.1/bin/x64/Rscript.exe -e "print('Hello, World');cat('aaa', file = 'E:/yyp/project20230620/gaoqing202400508RNA/GM-B6_vs_DM-B6/aa')"
[1] "Hello, World"
(R4) zhulab@DESKTOP-574GPKI:/mnt/e/yyp/code$
/mnt/c/'Program Files'/R/R-4.4.1/bin/x64/Rscript.exe -e "cat('aaa', file = 'E:/yyp/project20230620/gaoqing202400508RNA/GM-B6_vs_DM-B6/aaa')"
/mnt/c/'Program Files'/R/R-4.4.1/bin/x64/Rscript.exe -e "cat('aaa', file = 'E:/yyp/project20230620/gaoqing202400508RNA/GM-B6_vs_DM-B6/aa')"
/mnt/c/'Program Files'/R/R-4.4.1/bin/x64/Rscript.exe "E:/yyp/code/KEGGscript.R" ####在wsl2运行这个路径 才是对的
/mnt/c/Windows/System32/cmd.exe /c "C:/Program Files/R/R-4.4.1/bin/x64/Rscript.exe" "E:/yyp/code/KEGGscript.R" #在wsl2运行这个路径 才是对的
/mnt/c/'Program Files'/R/R-4.4.1/bin/x64/Rscript.exe /mnt/e/yyp/code/KEGGscript.R ###错误的路径