关于wordpress早期文章代码
如何去掉wordpress早期文章和最新文章代码,我在下面加了页码,想把这些去掉
更新时间:2023-12-08 18:12
最满意答案
SSH和heredoc
你不能在同一个命令行上创建两个 here-doc !
但是你可以完全在命令行上编写远程
ssh
命令:Script=$'while read foo ;do\n echo $HOSTNAME $foo\ndone' echo "$Script"
注意使用双引号 !
while read pass port user ip; do sshpass -p$pass ssh -o 'StrictHostKeyChecking no' -p $port $user@$ip "$Script" <<eoparams US something newyork test test1 test2 test3 challengepassword test4 eoparams done <<eodests mypasswd 22 root 192.168.1.1 mypasswd 22 root 192.168.1.2 mypasswd 22 root 192.168.1.3 eodests
SSH and heredoc
You could'nt make two here-doc on same command line!
But you could write distant
ssh
command entirely on command line:Script=$'while read foo ;do\n echo $HOSTNAME $foo\ndone' echo "$Script"
Note the use of double-quotes!
while read pass port user ip; do sshpass -p$pass ssh -o 'StrictHostKeyChecking no' -p $port $user@$ip "$Script" <<eoparams US something newyork test test1 test2 test3 challengepassword test4 eoparams done <<eodests mypasswd 22 root 192.168.1.1 mypasswd 22 root 192.168.1.2 mypasswd 22 root 192.168.1.3 eodests
相关问答
更多-
在ssh上运行命令时向远程机器询问问题(asking to questions from remote machine while running commands over ssh)[2022-12-05]
SSH和heredoc 你不能在同一个命令行上创建两个 here-doc ! 但是你可以完全在命令行上编写远程ssh命令: Script=$'while read foo ;do\n echo $HOSTNAME $foo\ndone' echo "$Script" 注意使用双引号 ! while read pass port user ip; do sshpass -p$pass ssh -o 'StrictHostKeyChecking no' -p $port $user@$ip "$Sc ... -
你有3个选择: 将您的查询包装在“sh”调用中,以便“<”由bash处理,而不是由java处理(ProcessBuilder(“sh”,“ - c”,“ssh xxxxx yyyy问题不是关于运行远程命令,而是关于引用和多级解析。 因为该命令用于生成脚本文件。 如果最后一个命令追加到.bash_profile,可以 export PATH="$HOME/bin:$PATH" 附加文件的命令 echo 'export PATH="$HOME/bin:$PATH"' >> "$HOME"/.bash_profile 传递作为文字只是走出去逃避单引号' run_on_B 'echo '\''export PATH="$HOME/bin:$PATH"'\'' >> "$HOME"/.ba ...我在一年前写的程序中遇到了这个问题 - 结果答案比较复杂。 您将需要使用nohup以及输出重定向,如nohup上的维基百科Artcle中所述,复制到此处为您方便。 Nohuping后台作业例如通过SSH登录时很有用,因为后台作业可能会导致shell由于竞争条件而挂起注销[2]。 这个问题也可以通过重定向所有三个I / O流来克服: nohup myprogram > foo.out 2> foo.err < /dev/null & I had this problem in a program I wro ...我恰巧读取了与此无关的sshd_config手册页,并找到了AcceptEnv选项: AcceptEnv指定客户端发送的环境变量将被复制到会话的环境中(7)。 请参阅ssh_config(5)中的SendEnv以了解如何配置客户端。 请注意,环境传递仅支持协议2.变量由名称指定,其中可能包含通配符*' and ?'。 多个环境变量可能被空白分隔或分散在多个AcceptEnv指令中。 被警告一些环境变量可以用来绕过受限的用户环境。 出于这个原因,在使用这个指令时应该小心。 默认不接受任何环境变量。 也许你可以 ...我认为@coderanger在评论中有最好的答案(“你几乎肯定不应该和Chef一起做这个”),但为了完整起见,我相信你的字符串中的换行没有被正确转义。 尝试这样的事情: execute "some_resource" do command <<-HEREDOC ssh -T user@host.com <<\'ENDSSH\' cat /etc/*-release ENDSSH HEREDOC end I think @coderanger has the best a ...
读取行循环时不使用远程命令进行SSH [重复](SSH while read line loop without using remote commands [duplicate])[2022-01-23]
告诉read使用不同的FD,然后你可以从ssh中删除-n 。 while read -u 3 ... do ... done 3< file Tell read to use a different FD, then you can remove the -n from ssh. while read -u 3 ... do ... done 3< fileman ssh : 如果指定了command ,则在远程主机而不是登录shell上执行。 人们可能会告诉你,你可以通过使用各种数量的-t来强制分配一个伪tty,但这样做会带来运行登录shell的副作用,因此它可能会更好 ssh admin@machine bash <自动运行SSH并运行命令(Automate SSH and running commands)[2023-09-04]
你当前的脚本并不是真的如何使用ssh远程执行命令。 它应该看起来更像这样 shh -i foo.pem user@host 'echo "here" ; hostname' (hostname命令只是用来证明其在其他机器上运行的示例。 良好的资源 刚看到你的编辑: EOF需要一直到左侧。 ssh -i foo.pem bc2-user@$h << EOF echo "here" sudo bash cd /data/kafka/t ...我认为您的问题是关于SSH到单个远程主机并在那里运行多个命令。 如果这是真的,那么您需要将多个命令打包到远程shell可以执行的单个命令行中。 最简单的方法是使用system的列表形式,并将命令行作为单个参数传递: system "ssh", "machine", "setup1; setup2; setup3"; 关于问题的第二部分:您希望从远程端获取数据。 为此,您需要程序读取SSH的输出而不是使用system 。 为此,您可以使用: open my $FH, "-|", "ssh", "machin ...相关文章
更多- springmvc文章分页源代码
- LeetCode:Word Break(DP)
- wordpress wp_mail
- 《WordPress 3.5 基础教程》(WordPress 3.5 Essential Training)[光盘镜像]
- 使用微信快捷登录Wordpress博客
- 微信机器人 WordPress 插件
- 《wordpress插件使用视频教程》(wordpress plugin tutorials)更新至第13集(在wordpress中把管理界面扁平化)[HDTV]
- 从其他网站的拉文章用什么技术?
- 《wordpress插件制作视频教程》(How to create a wordpress plugin)全5集更新完毕[HDTV]
- 《WordPress 3.5 基础教程》(WordPress 3.5 Essential Training)高清完整版[光盘镜像]
最新问答
更多- 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
- 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
- OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
- 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
- codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
- 在计算机拍照在哪里进入
- 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
- No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
- 单页应用程序:页面重新加载(Single Page Application: page reload)
- 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
- System.StackOverflow错误(System.StackOverflow error)
- KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
- 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
- android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
- TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
- 企业安全培训的各项内容
- 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
- C#类名中允许哪些字符?(What characters are allowed in C# class name?)
- NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
- 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
- 将多个行和可变行移动到列(moving multiple and variable rows to columns)
- 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
- 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
- Angular $资源不会改变方法(Angular $resource doesn't change method)
- 在Angular 5中不是一个函数(is not a function in Angular 5)
- 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
- 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
- 常见的python rpc和cli接口(Common python rpc and cli interface)
- Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
- 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)