首页  

sh -s 用法     所属分类 shell 浏览量 545
sh -s 
从标准输入中读取命令,并在子shell中执行
从第一个非 - 开头的参数开始,依次赋值给子shell的 $1,$2...
第一个非 - 开头的参数之前的参数,识别为sh的选项


echo 'ls $2' | sh -s '' '-l'

-rw-r--r-- 1 root root 2 3月  12 08:08 a.txt
-rw-r--r-- 1 root root 2 3月  12 08:08 b.txt

echo 'echo hello $1' | sh -s world
hello world

curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh

curl -sfL http://rancher-mirror.cnrancher.com/k3s/k3s-install.sh | INSTALL_K3S_MIRROR=cn INSTALL_K3S_VERSION=v1.18.3+k3s1 sh -s - --docker

上一篇     下一篇
temporal 技术要点

清晨的一点点感悟

k3s安装

kubectl命令介绍

kubectl常用命令

scala class 和 object 的 apply 方法