|
From: | Fabricio |
Subject: | Re: [shell-script] help case com maiusculas e minusculas ( era Help While ) |
Date: | Thu, 25 Aug 2005 10:20:03 -0300 |
User-agent: | Mozilla Thunderbird 1.0.6-1.1.fc4 (X11/20050720) |
[root@localhost scripts]# cat maiscula #!/bin/bash case $1 in [a-z]) echo "minuscula!" ;; [A-Z]) echo "maiscula!!" ;; *) echo "???" ;; esac [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]# ./maiscula c minuscula! [root@localhost scripts]# ./maiscula C minuscula! [root@localhost scripts]# vi maiscula [root@localhost scripts]# cat maiscula #!/bin/bash case $1 in [A-Z]) echo "maiscula!!" ;; [a-z]) echo "minuscula!" ;; *) echo "???" ;; esac [root@localhost scripts]# ./maiscula a minuscula! [root@localhost scripts]# ./maiscula A maiscula!! [root@localhost scripts]# ./maiscula b maiscula!! [root@localhost scripts]# ./maiscula B maiscula!! [root@localhost scripts]# ./maiscula c maiscula!! [root@localhost scripts]# ./maiscula C maiscula!! [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]# :S
[Prev in Thread] | Current Thread | [Next in Thread] |