sql 代码
- #!/bin/bash
- # none 1,2,3,15,20 signal
- trap '' 1 2 3 15 20
- #clear screen ,close redisplay
- clear
- stty -echo
- #set password
- echo -n "Enter your codeword: "
- read secretcode
- echo
- #confirm password
- echo -n "Enter your codeword again: "
- read same
- echo
- if [ $secretcode != $same ]
- then
- echo "Work on your short-term memory before using this code! "
- stty echo
- exit 1
- fi
- #get user input
- clear
- echo -n "Enter the code word: "
- read yourguess
- echo
- #only input is right codeword ,or loop forever
- while [ "$secretcode" != "$yourguess" ]
- do
- clear
- echo "secretcode: $secretcode \n yourguess: $yourguess"
- echo -n "Enter the code word: "
- read yourguess
- done
- #input real password to continue
- clear
- echo "Back gain! "
- stty echo
- exit 0
sql 代码
- #shell
- #! /bin/bash
- files=(`ls`) numfiles=`ls | wc -w`
- echo ${files[*]}
- echo ${files[1]}