Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有 main.sh,在里面调用 sub.sh。但是,我需要将信息传递给 sub.sh。可以这样做吗:
wget centos_64bit_novz.sh sh centos_64bit_novz.sh --LEVEL=$LEVELSEC --SERVVRT=novz
使用wget -O-,您将内容放入stdout. 并且bash -s,您可以使用参数。
wget -O-
stdout
bash -s
wget centos_64bit_novz.sh -O- | bash -s --LEVEL=$LEVELSEC --SERVVRT=novz