shell-script-pt
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [shell-script] help case com maiusculas e minusculas ( era Help Whi


From: MrBiTs
Subject: RE: [shell-script] help case com maiusculas e minusculas ( era Help While )
Date: Thu, 25 Aug 2005 09:23:31 -0300

/*
[root@localhost scripts]# ./maiscula a
minuscula!
[root@localhost scripts]# ./maiscula A
minuscula!
[root@localhost scripts]# ./maiscula b
minuscula!
[root@localhost scripts]# ./maiscula B
minuscula!
[root@localhost scripts]# cat maiscula
#!/bin/bash

case $1 in
[a-z]) echo "minuscula!" ;;
[A-Z]) echo "maiscula!!" ;;
esac
*/


Estranho demais:

$ ./d.sh A
maiscula!!
$ ./d.sh b
minuscula!
$ ./d.sh P
maiscula!!
$ ./d.sh c
minuscula!
$ cat d.sh
#!/bin/bash

case $1 in
        [a-z]) echo "minuscula!" ;;
        [A-Z]) echo "maiscula!!" ;;
esac 

$ bash --version
GNU bash, version 2.05b.0(1)-release
Copyright (C) 2002 Free Software Foundation, Inc.

------------------------------------------
"There is still more Unix-nature in one
line of shell script than there is in ten
billion lines of C" 
Master Foo - Sh-bng Province - 530 B.C.
 
"Programar em shell scritp é a coisa mais gostosa que você pode fazer
vestido"
Julio C. Neves - 10/08/2005



reply via email to

[Prev in Thread] Current Thread [Next in Thread]