摘要: Shell从广义上来说是指内核与用户之间的接口,是命令解释器。每当用户登录的时候,系统会为用户启动一个Shell, 是用户与系统进行交互。狭义上的Shell是指Shell提供的设计程序的语言环境。由于Unix的发展历史,Shell有很多不同的版本,可以查看/etc/shells这个文件来看系统支持哪些Shell版本。第一个流行的Shell是Bourne Shell,简称为sh,后来另一个广为流传的Shell是Bourne Again Shell, 简称为bash, 这是Linux默认的Shell。我的第一个Shell 脚本#! /bin/shif [ $# -lt 3 ]; thenecho 阅读全文
posted @ 2013-12-24 22:57 sxplus 阅读(194) 评论(0) 推荐(0) 编辑
摘要: 概念从第2个元素开始,将每一个元素插入到已经排好序的序列中,得到一个新的排好序的序列Java版实现 public static void insert(Integer[] array) { Integer s; int j; for (int i = 1; i = 0 && array[j] > s; j--) array[j+1] = array[j]; // move the element backward array[j+1] = s; // put the ith element in the right place } // end if the eleme. 阅读全文
posted @ 2013-12-24 01:03 sxplus 阅读(189) 评论(0) 推荐(0) 编辑