首页 > 其他分享 >put wget downloads to pipe

put wget downloads to pipe

时间:2023-09-30 18:56:17浏览次数:36  
标签:grep downloads http sed ess put wget data

wget -O - -o /dev/null  http://google.com

 

来源:https://serverfault.com/questions/25779/how-do-i-pipe-a-downloaded-file-to-standard-output-in-bash

 

实际应用:

下载某1024社区的某帖子里的全部图片,就可以使用如下:

这里awk, sed, grep 联合起来用的活生生的例子

#!/usr/bin/bash
#注意sed 不要使用global replacement: /g

wget -O - -o /dev/null $1 | awk '/ess-data/' | sed 's/ess-data=/\ness-data=/g' | grep "^ess-data" | sed "s/'/\n/" | grep "^http" | sed "s/'/\n/" | grep "^http" | uniq | sort | xargs wget -cq 

 

标签:grep,downloads,http,sed,ess,put,wget,data
From: https://www.cnblogs.com/profesor/p/17738107.html

相关文章

  • git clone项目报错fatal: fetch-pack: invalid index-pack output问题解决
    gitclone项目报错fatal:fetch-pack:invalidindex-packoutput问题解决原因出现该问题的原因是gitclone的项目过大导致项目拉去失败解决方法首先拉去项目最后一次提交gitclone--depth=1项目地址;拉取全部项目内容gitfetch--unshallow,一般不大的项目都可以......
  • CS61A: Structure and Interpretation of Computer Programs 笔记
    FunctionsEnvironmentDiagrams:左侧为Frames,右侧为Objects。Name类似变量名,它们存储在Frame中,指向各种各样的Objects,比如值或函数。一个Name同时只能指向一个Object,但可以改变自身指向,不受“类型”影响(Name根本没有固定的“类型”概念)。Assignment的过程是计算'='......
  • using wget utility to download files while keeping path structure
    Frommanwget:-x,--force-directories:[...]createahierarchyofdirectories,evenifonewouldnothavebeencreatedotherwise.E.g.wget-xhttp://fly.srk.fer.hr/robots.txtwillsavethedownloadedfiletofly.srk.fer.hr/robots.txt.  Togetthest......
  • poython文件运行模式和python控制台运行模式和Juputer运行模式
    今天学pytorch,我知道了python文件是整个代码运行,,而python控制台是一行一行的运行。而Juputer是任意代码块运行的。 ......
  • 全面分析 Vue 的 computed 和 watch 的区别
    全面分析Vue的computed和watch的区别 一、computed介绍computed用来监控自己定义的变量,该变量在data内没有声明,直接在computed里面定义,页面上可直接使用。//基础使用{{msg}}<inputv-model="name"/>//计算属性computed:{msg:function(){retur......
  • 模拟鼠标键盘操作PyUserInput
    模拟鼠标操作是模拟鼠标点击和键盘输入的操作,UI自动化测试中非常实用。在WebUI、AppUI、WinAppUI自动化测试讲解中借助Selenium和Appium框架下ActionChains、TouchAction、MouseButton等类已经介绍了如何模拟鼠标和键盘操作。本文将为大家介绍一个独立的、任何时候都可以模拟鼠......
  • 已解决No handles with labels found to put in legend
    已解决Nohandleswithlabelsfoundtoputinlegend文章目录报错问题解决方法PS报错问题之前在工作中遇到过这个坑,记录一下问题以及解决方法,不一定针对所有情况都能用,但是可以供大家参考。问题描述如下:Nohandleswithlabelsfoundtoputinlegendmatplotlib.pyplot.plot......
  • js jquery input radio点击事件
     HTML:<inputtype="radio"name="myname"value="1"/>1<inputtype="radio"name="myname"value="2"/>2 jquery代码: //点击事件change$('input[type=radio][name=myname]').ch......
  • Blob、InputStream、byte 互转
    在我们的程序开发当中,经常会用到java.sql.Blob、byte[]、InputStream之间的相互转换,但在JDK的API当中,又没有直接给我们提供可用的API,下面的程序片段主要就是实现它们之间互换的util.一、byte[]=>Blob我们可以通过Hibernate提供的表态方法来实现如:org.hibernate.Hibernate.Hiber......
  • HBase 之HFileOutputFormat
     hadoopmr输出需要导入hbase的话最好先输出成HFile格式,再导入到HBase,因为HFile是HBase的内部存储格式,所以导入效率很高,下面是一个示例1.创建HBase表t11.hbase(main):157:0*create't1','f1'2.0row(s)in1.3280seconds3.4.hbase(main):158:0>5.ROW......