当前位置:网站首页>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 &
边栏推荐
- 7.2 daily study 4
- Unity Xlua MonoProxy Mono代理类
- [there may be no default font]warning: imagettfbbox() [function.imagettfbbox]: invalid font filename
- 分类TAB商品流多目标排序模型的演进
- Web API configuration custom route
- Huawei equipment configures channel switching services without interruption
- Detailed explanation of MATLAB cov function
- COMSOL--三维随便画--扫掠
- 2048 game logic
- 7 大主题、9 位技术大咖!龙蜥大讲堂7月硬核直播预告抢先看,明天见
猜你喜欢

购买小间距LED显示屏的三个建议

如何将 DevSecOps 引入企业?
![[crawler] bugs encountered by wasm](/img/29/6782bda4c149b7b2b334238936e211.png)
[crawler] bugs encountered by wasm

COMSOL -- 3D casual painting -- sweeping

Harbor image warehouse construction

R3Live系列学习(四)R2Live源码阅读(2)

Cdga | six principles that data governance has to adhere to
![[Oracle] use DataGrid to connect to Oracle Database](/img/4f/886378667889f730eaed39b97f0a39.png)
[Oracle] use DataGrid to connect to Oracle Database

不要再说微服务可以解决一切问题了!

CDGA|数据治理不得不坚持的六个原则
随机推荐
ZCMU--1390: 队列问题(1)
OneForAll安装使用
[crawler] bugs encountered by wasm
Unity Xlua MonoProxy Mono代理类
uboot的启动流程:
Technology sharing | common interface protocol analysis
技术分享 | 常见接口协议解析
Ffmpeg calls avformat_ open_ Error -22 returned during input (invalid argument)
SLAM 01. Modeling of human recognition Environment & path
An error is reported in the process of using gbase 8C database: 80000305, host IPS long to different cluster. How to solve it?
How did the situation that NFT trading market mainly uses eth standard for trading come into being?
What does cross-border e-commerce mean? What do you mainly do? What are the business models?
Spark Tuning (I): from HQL to code
C#实现WinForm DataGridView控件支持叠加数据绑定
Prevent browser backward operation
基于Lucene3.5.0怎样从TokenStream获得Token
如何让全彩LED显示屏更加节能环保
How to introduce devsecops into enterprises?
NFT 交易市场主要使用 ETH 本位进行交易的局面是如何形成的?
阻止浏览器后退操作