-
echo
显示文本 -
>
或>>
重定向到指定文件 -
type
查看文件文本内容
# 用echo.xxx >将内容重定向到 .Rprofile文件
>echo.options(BioC_mirror='https://mirrors.tuna.tsinghua.edu.cn/bioconductor') > .Rprofile
# 用echo.xxx >>将内容追加到文件下一行
>echo.utils::setRepositories(ind=1:2) >> .Rprofile
# 用echo. >>加入空行
>echo. >> .Rprofile
# 用echo xxx >>将文本不换行直接追加到后面
>echo options(repos = c(CRAN = "https://mirrors.tuna.tsinghua.edu.cn/CRAN/")) >> .Rprofile
# 查看写入的内容
>type .Rprofile
options(BioC_mirror='https://mirrors.tuna.tsinghua.edu.cn/bioconductor')
utils::setRepositories(ind=1:2)
options(repos = c(CRAN = "https://mirrors.tuna.tsinghua.edu.cn/CRAN/"))
-
more
查看文件前几行,q
退出
-参考文章
windows cmd编辑文本
网友评论