没有合适的资源?快使用搜索试试~ 我知道了~
脚本:轻松在Go中编写类似shell的脚本
共63个文件
go:27个
txt:19个
yml:2个
需积分: 15 1 下载量 157 浏览量
2021-02-05
21:58:46
上传
评论
收藏 167KB ZIP 举报
温馨提示
import github . com / bitfield / script 什么是script ? script是一个Go库,用于执行shell脚本擅长的那种任务:读取文件,执行子进程,计算行数,匹配字符串等。 为什么用Go编写系统管理程序不像在典型的Shell中那样容易? script旨在使其变得如此简单。 Shell脚本通常在数据流(管道)上构成一系列操作。 script也是如此。 我该怎么办? 让我们看一个简单的例子。 假设您想以字符串形式读取文件的内容: contents , err := script . File ( "test.txt" ). String ()
资源推荐
资源详情
资源评论
收起资源包目录
script-master.zip (63个子文件)
script-master
pipes_test.go 4KB
testdata
multiple_files
3.tar.zip 0B
2.txt 0B
1.txt 0B
bytes.bin 4B
multiple_files_with_subdirectory
3.tar.zip 0B
2.txt 0B
dir
2.txt 0B
.hidden 0B
1.txt 0B
1.txt 0B
freq.input.txt 110B
last10.golden.txt 248B
concat.golden.txt 95B
first10.golden.txt 229B
empty.txt 0B
test.txt 84B
column.input.txt 323B
freq.golden.txt 40B
sha256Sum.input.txt 26B
column.golden.txt 29B
first.input.txt 433B
hello.txt 11B
pipes.go 2KB
read_auto_closer.go 1KB
sources.go 3KB
img
fundamentals.png 44KB
data.png 70KB
doc.go 199B
main_test.go 274B
.github
FUNDING.yml 64B
read_auto_closer_test.go 653B
sinks.go 4KB
LICENSE 1KB
CONTRIBUTING.md 19KB
examples
sha256sum
main.go 560B
cat
main.go 169B
head
main.go 212B
execute
main.go 124B
grep
main.go 122B
least_freq
main.go 187B
execforeach
main.go 207B
echo
main.go 98B
find
main.go 183B
slice
errors.txt 495B
main.go 524B
visitors
access.log 6KB
main.go 707B
go.mod 67B
tail
main.go 211B
ls
main.go 326B
todo
examples.text 2KB
main.go 697B
cat2
main.go 215B
.gitignore 175B
filters_test.go 12KB
sinks_test.go 7KB
.circleci
config.yml 183B
go.sum 348B
README.md 35KB
filters.go 11KB
go.mod 129B
sources_test.go 6KB
共 63 条
- 1
资源评论
晔晔匠
- 粉丝: 23
- 资源: 4650
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 产品说明书翻译及练习(1).pdf 产品说明书翻译及练习(1).pdf
- 【图书馆预约】个人版(仅个人使用)
- xcap,好用的发包工具
- kouzhao-main-pycharm官网
- 太原理工大学在项目管理方面涉及多个领域和层面 以下是对太原理工大学项目管理的一些概述: 实验室建设项目管理:太原理工大学制定了
- python 数据分析示例
- 一分钟计数绷踢.mp4
- intel-visual-fortran-xe2011.zip
- tensorflow-gpu-2.5.3-cp37-cp37m-manylinux2010-x86-64.whl
- tensorflow-gpu-2.2.1-cp35-cp35m-win-amd64.whl
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功