shell 數組
[[email protected] ~]# python tt.py server1 server2 [[email protected] ~]# bash a.sh server01 server02
[[email protected] ~]# cat a.sh #!/bin/bash server="server01 server02" for i in ${server} do echo ${i} done [[email protected] ~]# cat tt.py #!/usr/bin/env pyhton #encoding:utf-8 def do(): arry = ["server1","server2"] for i in arry: print(i) if __name__ == "__main__": do() [[email protected]
本文出自 “磚家博客” 博客,請務必保留此出處http://wsxxsl.blog.51cto.com/9085838/1953603
shell 數組