当前位置:网站首页>Shell script file traversal STR to array string splicing
Shell script file traversal STR to array string splicing
2022-07-05 11:30:00 【Zhuge iron and steel cloud】
#!/bin/bash
#file=$(cat /Users/jian.wang13/code/test/0701.txt)
#houzhui=$(awk -F '/' '{print $3}' /Users/jian.wang13/code/test/0701.txt)
houzhui=$(awk -F '/' '{print $3}' /root/snap/0701.txt)
#echo $houzhui, String splicing
qianzhui="XXXXX.com/"
for i in $houzhui
do
# echo $i
for j in $qianzhui
do
aws_jingxiang=$j$i
cn_jingxiang="XXXXX/"$i
echo $cn_jingxiang","$aws_jingxiang >> "/root/snap/jingxiang.txt"
if [ $? -eq 0 ];then
break
fi
done
done
#file2='/Users/jian.wang13/code/test/jingxiang.txt'
# Take out one column of each line of the file
#file3=$(cat /Users/jian.wang13/code/test/jingxiang.txt)
for line in `cat /root/snap/jingxiang.txt`
do
# echo $line
units=(`echo $line | tr ',' ' '`)
# echo ${units[0]} ${units[1]}
docker pull ${units[0]} && docker tag ${units[0]} ${units[1]} && docker push ${units[1]}
done
echo '' > "/root/snap/jingxiang.txt"
@@@@@@@@@@@@@@@@@@@@@
The background to perform &>/dev/null &
边栏推荐
- idea设置打开文件窗口个数
- [Oracle] use DataGrid to connect to Oracle Database
- Dspic33ep clock initialization program
- Cron expression (seven subexpressions)
- Implementation of array hash function in PHP
- Stop saying that microservices can solve all problems!
- Project summary notes series wstax kt session2 code analysis
- COMSOL--建立几何模型---二维图形的建立
- Modulenotfounderror: no module named 'scratch' ultimate solution
- [advertising system] parameter server distributed training
猜你喜欢

pytorch训练进程被中断了

【爬虫】wasm遇到的bug

Stop saying that microservices can solve all problems!

7.2每日学习4

OneForAll安装使用

如何将 DevSecOps 引入企业?

Summary of thread and thread synchronization under window

中非 钻石副石怎么镶嵌,才能既安全又好看?

Evolution of multi-objective sorting model for classified tab commodity flow
![[advertising system] parameter server distributed training](/img/8b/558c2fefbd16b580546003f3afeaf5.png)
[advertising system] parameter server distributed training
随机推荐
uboot的启动流程:
分类TAB商品流多目标排序模型的演进
go语言学习笔记-分析第一个程序
POJ 3176 cow bowling (DP | memory search)
解决readObjectStart: expect { or n, but found N, error found in #1 byte of ...||..., bigger context ..
MySQL giant pit: update updates should be judged with caution by affecting the number of rows!!!
2048游戏逻辑
居家办公那些事|社区征文
如何将 DevSecOps 引入企业?
Codeforces Round #804 (Div. 2)
Solve the grpc connection problem. Dial succeeds with transientfailure
不要再说微服务可以解决一切问题了!
Cron expression (seven subexpressions)
Oneforall installation and use
C # to obtain the filtered or sorted data of the GridView table in devaexpress
AutoCAD -- mask command, how to use CAD to locally enlarge drawings
中非 钻石副石怎么镶嵌,才能既安全又好看?
COMSOL--三维随便画--扫掠
技术管理进阶——什么是管理者之体力、脑力、心力
Mysql统计技巧:ON DUPLICATE KEY UPDATE用法