当前位置:网站首页>Shell script multi loop experiment
Shell script multi loop experiment
2022-06-30 09:54:00 【thengsd】
Catalog
One 、99 Multiplication table
#!/bin/bash
for ((a=1;a<=9;a++))
do
for ((b=1;b<= a ; b + + ) ) d o c = a;b++)) do c= a;b++))doc=[ a ∗ a* a∗b]
echo -n -e “ a ∗ a* a∗b=$c\t”
done
echo “”
done
Two 、 rectangular
#!/bin/bash
for ((a=1;a<=5;a++))
do
for ((b=1;b<=10;b++))
do
echo -n “*”
done
echo “”
done
3、 ... and 、 A straight line
#!/bin/bash
for ((a=1;a<=15;a++))
do
echo -n “*”
done
echo “”
Four 、 Right triangle
5、 ... and 、 An inverted right triangle
#!/bin/bash
for ((a=1;a<=9;a++))
do
for ((b=9;b>=$a;b–))
do
echo -n “*”
done
echo “”
done
6、 ... and 、 Isosceles right triangle
#!/bin/bash
for ((a=1;a<=9;a++))
do
for ((b=9;b>=$a;b–))
do
echo -n " "
done
for ((c=1;c<= [ [ [a2-1];c++))
do
echo -n ""
done
echo “”
done
边栏推荐
- Read the difference and connection between hyperfusion and private cloud
- Mysql database learning 1
- Valuenotifier and valuelistenablebuilder in fluent
- [new book recommendation] cleaning data for effective data science
- Why won't gold depreciate???
- Financial private cloud infrastructure scheme evaluation (Architecture and storage)
- Bloom filter
- JWT expiration processing - single token scheme
- Horrible bug records
- 关于字符串的split和join操作
猜你喜欢
IDC released the report on China's software defined storage and hyper convergence market in the fourth quarter of 2020, and smartx hyper convergence software ranked first in the financial industry
MySQL index and data storage structure foundation
How to reduce the delay in live broadcast in the development of live broadcast source code with goods?
Eight sorts (I)
Flume learning 1
7.手机登陆功能开发
Flume learning II - Cases
prometheus 监控之 ntp_exporter
MySQL优化
Dart 开发技巧
随机推荐
utils session&rpc
Slf4j: failed to load class "org.slf4j.impl.staticloggerbinder"
Cftpconnection:: getfile() download FTP server files and related parameter descriptions
Idea shortcut key settings
2021-07-26
Demo of guavacache
Bluetooth BT RF test (forwarding)
How do databases go to the enterprise cloud? Click to view the answer
utils session&rpc
【新书推荐】Deno Web Development
Application exploration and practice of super convergence in the production environment of insurance industry
Create thread pool demo
Upgrade log4j2 to 2.17.1 stepped pit
单片机 MCU 固件打包脚本软件
How to reduce the delay in live broadcast in the development of live broadcast source code with goods?
Dart development skills
GPT (improving language understanding generative pre training) paper notes
ABAP-时间函数
Installing Oracle database process in windows2007 on VM
Read the difference and connection between hyperfusion and private cloud