Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Programming \ Linux shell scripts bubble sort     - Linux three ways to set environment variables (Linux)

- Firewall - Internet Militarization (Linux)

- Eclipse-4.4 crash problem solving under Debian-7.6 (Linux)

- Using DBMS_STAT function closes mission (Database)

- Enterprise Hadoop cluster architecture - NFS installation (Server)

- Debian 8.2.0 (Jessie) fast clean installation tutorial (Linux)

- Ubuntu How to install and upgrade Linux Kernel 3.15 (Linux)

- Create a DLL using MinGW and Attention (Programming)

- MySQL appears data too long for column 'name' at row 1 to solve (Database)

- Linux five security TIPS (Linux)

- Linux argument references and command substitution (Linux)

- CentOS / Linux kernel upgrade (Linux)

- Slice MyCAT common fragmentation rules of enumeration (Database)

- Linux configuration Samba server (Server)

- Ubuntu prevent arp attacks (Linux)

- Android Fragment everything you need to know (Programming)

- Through Oracle to help restore MySQL data problems (Database)

- Linux tar compressed exclude a folder (Linux)

- Two kinds of agents of Spring AOP (Programming)

- Oracle restrict certain IP, the malicious user actions on important table (Database)

 
         
  Linux shell scripts bubble sort
     
  Add Date : 2017-04-13      
         
         
         
  Manually enter his string, and sorts.
Script as follows:

#! / Bin / bash
#a test about sort
echo "please input a number list"
read -a arrs
for ((i = 0; i < $ {# arrs [@]}; i ++)) {
    for ((j = 0; j < $ {# arrs [@]} - 1; j ++)) {
      if [[$ {arrs [j]} -gt $ {arrs [j + 1]}]]; then
           tmp = $ {arrs [j]}
           arrs [j] = $ {arrs [j + 1]}
           arrs [j + 1] = $ tmp
       fi
}
}
echo "after sort"
echo $ {arrs [@]}
     
         
         
         
  More:      
 
- Linux system security configuration (Linux)
- iptables using summary (Linux)
- Ubuntu 14.04 Fixed update information is outdated error (Linux)
- Linux shell script to adjust the Task Scheduler (Linux)
- Linux System Getting Started Tutorial: How to change the default Java version in Linux (Linux)
- Json data with double backslashes to a single backslash Json data processing (Programming)
- Installation Atom text editor on Mint Ubuntu / Linux (Linux)
- System-level alias vs Oracle ADR functionality (Database)
- SSH without password (Linux)
- Ubuntu prevent arp attacks (Linux)
- Memory leak analysis using Android studio (Programming)
- MySQL event table to achieve timing build a small note (Database)
- How to configure MariaDB replication in CentOS Linux (Database)
- cp: omitting directory error solutions under Linux (Linux)
- 3 tips Linux command (Linux)
- Installation Sublime Text 3 (Build 3065) text editor in Ubuntu (Linux)
- Android annotation support (Support Annotations) (Programming)
- MySQL server after an unexpected power outage can not start (Database)
- CentOS iptables firewall enabled (Linux)
- C ++ Learning Notes: references (Programming)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.