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

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

Re: (SUGESTAO) [shell-script] help case com maiusculas e minusculas ( er


From: Fabricio
Subject: Re: (SUGESTAO) [shell-script] help case com maiusculas e minusculas ( era Help While )
Date: Thu, 25 Aug 2005 11:49:32 -0300
User-agent: Mozilla Thunderbird 1.0.6-1.1.fc4 (X11/20050720)

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

case $1 in
[A-Z]) echo "maiscula!!" ;;
[a-z]) echo "minuscula!" ;;
*) echo "???" ;;
esac
echo "$1"
[root@localhost scripts]# bash --version
GNU bash, version 3.00.16(1)-release (i386-redhat-linux-gnu)
Copyright (C) 2004 Free Software Foundation, Inc.

[root@localhost scripts]# vi maiscula_new
[root@localhost scripts]# ./mai
maior.sh maiscula maiscula_new [root@localhost scripts]# ./maiscula_new a
minuscula
[root@localhost scripts]# ./maiscula_new A
MAIUSCULA
[root@localhost scripts]# ./maiscula_new b
minuscula
[root@localhost scripts]# ./maiscula_new B
MAIUSCULA
[root@localhost scripts]# cat maiscula_new
#!/bin/bash
case $1 in
 [[:lower:]]) echo "minuscula" ;;
 [[:upper:]]) echo "MAIUSCULA" ;;
 *) echo "???" ;;
esac



eh quem a suestao do upper e lower funciona , mas eu queria saber pq o primeiro script nao vai :/


reply via email to

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