小编lok*_*ika的帖子

打印两个图案之间(并排除)之间的线条

我将使用 cURL 提交表单,其中一些内容来自其他文件,使用选择 sed

如果param1使用来自其他文件的行匹配模式sed,下面的命令将正常工作:

curl -d param1="$(sed -n '/matchpattern/p' file.txt)" -d param2=value2 http://example.com/submit
Run Code Online (Sandbox Code Playgroud)

现在,去解决问题。我只想显示 2 个匹配模式之间的文本,不包括匹配模式本身。

可以说file.txt包含:

Bla bla bla
firstmatch
It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.
secondmatch
The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look …
Run Code Online (Sandbox Code Playgroud)

sed text-processing

15
推荐指数
3
解决办法
3万
查看次数

如何获取 Youtube 可怕的 URL

我要去 wget youtube 搜索页面,那里的 URL 很糟糕。这是searchkeyword按上传日期排序的搜索示例:

wget http://www.youtube.com/results?search_type=videos&search_query=searchkeyword&search_sort=video_date_uploaded&suggested_categories=26%2C27%2C22%2C28%2C24
Run Code Online (Sandbox Code Playgroud)

这是搜索结果的第 2 页:

wget http://www.youtube.com/results?search_type=videos&search_query=searchkeyword&search_sort=video_date_uploaded&suggested_categories=26%2C27%2C22%2C28%2C24&page=2
Run Code Online (Sandbox Code Playgroud)

wget 为我提供了两个页面的误导性页面。

shell wget

5
推荐指数
1
解决办法
3135
查看次数

多线程下载youtube视频的命令行方式

在快速的互联网连接上,与从其他网站下载文件相比,下载 Youtube 视频太慢了。目前我正在使用get_flash_videos下载 Youtube 视频。

我如何get_flash_videos与多线程下载加速器(如axelMultiGet或 )集成Wxdownloadfast

download youtube

5
推荐指数
1
解决办法
4915
查看次数

命令行 cURL 从其他文件提交表单

在这个命令中:

curl -d param1=value1 -d param2=value2 http://example.com/submit
Run Code Online (Sandbox Code Playgroud)

如果value1位于 中file1.txt,如何使 cURL 包含file1.txt在命令中?

curl

3
推荐指数
1
解决办法
1162
查看次数

标签 统计

curl ×1

download ×1

sed ×1

shell ×1

text-processing ×1

wget ×1

youtube ×1