我想知道是否有办法提前检查我可能通过下载的文件的大小wget?我知道使用该--spider选项告诉我文件是否存在,但我也有兴趣找到该文件的大小.
我是 sed 的新手,总是在输入文件上执行一个命令,最近我尝试使用它"-e"来处理多个命令,但我无法弄清楚它是如何工作的,默认打印非常烦人,所以我无法弄清楚命令执行的顺序。
sed -e 'command 1' -e 'command 2' input.txt
Run Code Online (Sandbox Code Playgroud)
input.txt的内容:
line1
line2
line3
Run Code Online (Sandbox Code Playgroud)
问题1:处理流程是怎样的?是吗
command1 processes line1 and then command2 processes new-line1(processed by cmd1)
command1 processes line2 and then command2 processes new-line2(processed by cmd1)
command1 processes line3 and then command2 processes new-line3(processed by cmd1)
Run Code Online (Sandbox Code Playgroud)
或者
command1 processes line1
command1 processes line2
command1 processes line3
command2 processes new-line1(already processed by cmd1)
command2 processes new-line2(already processed by cmd1)
command2 processes new-line3(already processed by cmd1)
Run Code Online (Sandbox Code Playgroud)
问题 2: 正如我提到的,默认打印非常烦人,我应该在第一个 …