Skip to navigation Skip to content
Simon Technology Blog
  • Architecture
  • Cloud
  • Database
  • Develop
  • Hardware
  • Industry
  • Language
  • Mobile
  • Opensource
  • OS
  • Web
Main Navigation

Tag: Script

Shell script writing code

Now centos7 is using the bash software, you can view the bash version through the following command:

[[email protected] ~]# cat /etc/redhat-release #View the system version
CentOS Linux rele

October 18, 2021By Simo Unix code, Script, shell, writeLeave a Comment

Shell script prints ninety-nine multipliers

The shell script prints the nine-nine-nine multiplication table #!/bin/bash

for i in {1..9}
do
for j in {1..9}
do
if [$j -le $i]
then
echo -n “${j}X${i}= $(($i*$j)) ”
fi
done

October 18, 2021By Simo Unix ninety-nine multiplier, print, Script, shellLeave a Comment

Shell script for While Until loop

Flow controlLogic processing in programming: Sequential execution
Select execution
Circular execution Loop Loop execution
Repeat a certain code segment several times
How many times it repeats
T

October 18, 2021By Simo Unix loop, Script, shellLeave a Comment

Shell script Advanced (for, while, continue, break, select, etc.)

Advanced script oneOne, the second way of writing for loop:

As we all know, there are two ways of writing for

< strong>How to write directly:

Two parentheses must be written after

October 18, 2021By Simo Unix advanced, break, Continue, etc, First, Script, select, shellLeave a Comment

Execution method of shell scripts

When the Shell script runs, it will first look for the system environment variable ENV, which specifies the environment file (the order of loading is usually /etc/profile, ~/.bash_profile, ~/.bashr

October 18, 2021By Simo Unix detailed, execution, method, Script, shellLeave a Comment

Shell script reception parameters

test.sh

#!/bin/bash
echo “Script name$0”
echo “The first parameter $1”
echo “The second parameter $2”
echo “The third parameter $3”
echo “The fourth parameter $4”
echo “The fifth parame

October 18, 2021By Simo Unix parameter, receiving, Script, shellLeave a Comment

Record the special variables in the shell script

1. Special location variables

About the above related variables introduction , You can also refer to the man manual, execute the command “man bash”, and then search for the keyword “Special P

October 18, 2021By Simo Unix Medium, Record, Script, shell, special, variableLeave a Comment

Shell script – text processing and programming principle

1. Text processing tools

wc command

wc (Word count) is used to count the number of characters in a text file

15 is the number of lines 78 is the number of characters 805 is the fi

October 18, 2021By Simo Unix and programming, principle, Processing, Script, shell, TextLeave a Comment

Shell script prints rectangles

Shell script printing rectangle #!/bin/bash

for ((i=1;i<= 9;i++)) do for ((j=1;j<=9;j++)) do echo -n "*" done echo done

#!/bin/bash

for ((i=1;i<= 9;i++)) do for ((j=1;j<=9;j++)) do echo -n "*" done echo done

October 18, 2021By Simo Unix print, Rectangle, Script, shellLeave a Comment

Shell script – loop

1. The writing method of for statement based on C language format:

for((i=0;i<10;i++)); do【for (initial conditions ; Conditional judgment statement; Value change statement); do】

loop bo

October 18, 2021By Simo Unix loop, Script, shellLeave a Comment

Posts navigation

Page 1 Page 2 Page 3 … Page 6
Recent Posts
  • Sencha-Touch-2 – Sencha Touch 2, Nested XML Analysis NodeValue
  • Add a separation line and format XML content
  • Is there a norm of simplified XML subsets?
  • Look at it when you write React
  • ReactJS – Present React Redux React-Router App to add the server to the Firebase hosted by the Firebase
Categories
  • Android
  • Apache
  • Apache Kafka
  • Asp
  • Auto-Test
  • Automated Build
  • Aws
  • Bitcoin
  • Browser
  • C & C++
  • C#
  • Centos
  • Cgi
  • Character
  • Cloud Service
  • Cocos2dx
  • Cordova
  • CSS
  • Data Structure
  • Delphi
  • Design Pattern
  • Dojo
  • Dubbo
  • ELK
  • Flex
  • football
  • Game
  • Hadoop
  • Hibernate
  • HTML
  • Hybrid
  • Intel
  • IOS
  • Ipad
  • iPhone
  • Java
  • Javascript
  • Jetty
  • JQuery
  • Jsp
  • Linux
  • Load Balance
  • Lua
  • Macbook
  • Macos
  • Mathematics
  • Micro Services
  • Monitoring
  • Motherboard
  • Mysql
  • Network Hardware
  • Network Marketing
  • Nginx
  • NodeJs
  • Nosql
  • Oracle
  • Os Theory
  • Performance
  • PHP
  • Postgresql
  • Power Designer
  • React
  • Redis
  • Regexp
  • Rom
  • Rss
  • Ruby
  • Search Engines
  • Shell Script
  • Silicon Valley
  • Silverlight
  • Software Design
  • Spring
  • Sql
  • Sqlite
  • Sqlserver
  • Storage
  • Storm
  • Surface
  • SVN
  • Swift
  • System Architecture
  • Tablet
  • Uncategorized
  • Unix
  • Visual Basic
  • Visual Studio
  • Web Crawler
  • WebService
  • Windows
  • Wireless
  • XML
  • ZooKeeper
Archives
  • October 2021
  • September 2021
  • August 2021
  • May 2021
  • April 2021
  • September 2020
  • September 2019
  • August 2019
  • June 2019
  • May 2019
  • April 2019
  • March 2019
© Simon Technology Blog 2025 • ThemeCountry Powered by WordPress