99 multiplication table for shell scripts

Source: Internet
Author: User

A 9x9 multiplication table was written with a shell script, for reference only! Text below ...

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/87/53/wKiom1fc_6mT0-TPAABEz2kbGyk527.png "title=" 99.PNG "alt=" Wkiom1fc_6mt0-tpaabez2kbgyk527.png "/>

#!/bin/bash

#Author: Victor Email:[email protected] Date:2016-09-17

#Release 1.0

#Function: 9x9 multiplication table

Path=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:~/bin

Export PATH

function multiplication () {

For I in ' SEQ 1 9 ';d o


For J in {1..9};d o


[[${i}-ge ${j}]] && echo-n "${j}x${i} = $ ((${i}*${j}))"


Done


Echo

Done

}

Multiplication


This article from the "Linux-related technology" blog, declined to reprint!

99 multiplication table for shell scripts

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.