gunpg on solaris 2.6

Caskey L. Dickson caskey at technocage.com
Mon Mar 15 14:44:36 CET 1999


On Mon, 15 Mar 1999, Werner Koch wrote:

> "Jason C. Axley" <jason at axley.net> writes:
> 
> > mds.test:  fails on the empty string test
> 
> Mea culpa.  
> 
> $ echo -n "" 
> 
> Isn't good on Solaris?

See the man page excerpt below for details, these examples are done with
bash-2.02. 

$ uname -a
SunOS alvin 5.7 Generic sun4u sparc SUNW,Ultra-5_10
$ echo ""

$ echo -n ""
$ /bin/echo ""

$ /bin/echo -n ""
-n 
$ echo '\c'
\c
$ /bin/echo '\c'
$ 

Excerpts from 'echo(1)':

     The C shell, the Korn shell, and the Bourne shell  all  have
     echo   built-in commands, which, by default, will be invoked
     if the user  calls  echo   without  a  full  pathname.   See
     shell_builtins(1).   sh   's  echo  ,  ksh  's  echo  ,  and
     /usr/bin/echo understand the back-slashed escape characters,
     except  that sh 's echo  does not understand \a as the alert
     character. In addition, ksh 's echo , does  not  have  a  -n
     option. sh 's
      echo  and /usr/bin/echo only have a -n option if the  SYSV3
     environment  variable is set (see ENVIRONMENT below).  If it
     is, none of the backslashed characters mentioned  above  are
     availible.  csh  's  echo   and  /usr/ucb/echo, on the other
     hand, have a -n option, but  do  not  understand  the  back-
     slashed escape characters.

[...]

     string    A string to be written to standard output.  If any
               operand  is  "-n", it will be treated as a string,
               not an option.  The following character  sequences
               will be recognized within any of the arguments:

[...]
               \c        print line without new-line
[...]

     Portable applications should not use -n (as the first  argu-
     ment) or escape sequences.

[...]

     New applications are encouraged to use  printf   instead  of
     echo .


C=)

--------------------------------------------------------------------------
       When you smell odorless gas, it's probably carbon monoxide.
--------------------------------------------------------------------------
Caskey <caskey*technocage.com>       ///                pager.818.698.2306
TechnoCage Inc.                     ///|               gpg: aiiieeeeeee!!!
--------------------------------------------------------------------------
        Cats are intended to teach us that not everything in nature
                    has a purpose.  -- Garrison Keillor





More information about the Gnupg-devel mailing list