Re: Confusion

Derek Taubert <[email protected]>
Newsgroups gmane.comp.hardware.roku.technical
Message-ID <[email protected]>
On Thu, May 13, 2004 at 04:48:34PM -0700, Patrick Ellis wrote:
> Hey Barry,
> 
> //mp3player -p  &
> //[1] 7185                         (WHAT IS THIS LINE?}
> I believe this is the job number and process ID for the program you just
> launched.  Dave will correct me if I'm wrong.  Also, unless you're using a
> modified version of the mp3player, it doesn't have a "-p" option.  In this case,
> it's assuming the -p is a filename and adding it to the queue (it doesn't check
> for file validity until playtime).
> 
> //(FROM HERE FORWARD IT LOOKS LIKE SOME SORT OF DEBUG DUMP; WHY 
> //AND HOW DO I GET 
> //RID OF IT - I.E. WHAT IS CAUSING IT)
> 
> These are messages from underlying drivers.  You may be able to get rid of them
> (do you really need to?) by redirecting stdout to /dev/null by launching the
> program thusly: /path/to/program -options 2>/dev/null
> 
> Although doing it this way would result in not seeing errors printed by the
> program.
> 
> //--> ecp mp3player append "/mnt/smb/server/my music/bruce 
> //springsteen & 
> //--> the e
> //street band/live 1975-´85 (disc 2)/born in the u.s.a..mp3"
> //ecp mp3player append /mnt/smb/server/my music/bruce 
> //springsteen & the e st
> //mp3player: unable to append file  (WHY NOT)
> 
> I'm not sure.  There seems to be a bug in ECP related to spaces in arguments
> (even when quoted).  It could be that.  You're certain the path to the file is
> correct?  It is curious that the local echo of the command-line doesn't display
> the entire command-line.  Sorry I'm not more help with this, but I don't see
> anything straight away that looks fishy.

The double quotes won't keep the shell from trying to expand the text
within.  From the bash man page:

QUOTING
       Quoting  is  used to remove the special meaning of certain
       characters or words to the shell.  Quoting can be used  to
       disable  special treatment for special characters, to pre­
       vent reserved words from being recognized as such, and  to
       prevent parameter expansion.

       Each  of the metacharacters listed above under DEFINITIONS
       has special meaning to the shell and must be quoted if  it
       is to represent itself.

       When  the  command  history expansion facilities are being
       used, the history expansion character, usually !, must  be
       quoted to prevent history expansion.

       There  are three quoting mechanisms: the escape character,
       single quotes, and double quotes.

       A non‐quoted backslash (\) is the  escape  character.   It
       preserves  the  literal  value  of the next character that
       follows, with the exception of <newline>.  If a \<newline>
       pair  appears, and the backslash is not itself quoted, the
       \<newline> is treated as a line continuation (that is,  it
       is removed from the input stream and effectively ignored).

       Enclosing characters in single quotes preserves  the  lit­
       eral  value of each character within the quotes.  A single
       quote may not occur between single quotes, even when  pre­
       ceded by a backslash.

       Enclosing  characters  in double quotes preserves the lit­
       eral value of all characters within the quotes,  with  the
       exception  of  $, �‘, and \.  The characters $ and �‘ retain
       their special meaning within double quotes.  The backslash
       retains  its  special meaning only when followed by one of
       the following characters: $, �‘, ",  \,  or  <newline>.   A
       double quote may be quoted within double quotes by preced­
       ing it with a backslash.

       The special parameters * and @ have special  meaning  when
       in double quotes (see PARAMETERS below).

       Words  of  the  form $’string’ are treated specially.  The
       word expands to string, with backslash‐escaped  characters
       replaced  as  specifed  by the ANSI C standard.  Backslash
       escape sequences, if present, are decoded as follows:
              \a     alert (bell)
              \b     backspace
              \e     an escape character
              \f     form feed
              \n     new line
              \r     carriage return
              \t     horizontal tab
              \v     vertical tab
              \\     backslash
              \�’     single quote
              \nnn   the eight‐bit character whose value  is  the
                     octal value nnn (one to three digits)
              \xHH   the  eight‐bit  character whose value is the
                     hexadecimal value HH (one or two hex digits)

       The  expanded  result  is  single‐quoted, as if the dollar
       sign had not been present.

       A double‐quoted string preceded by a dollar sign ($)  will
       cause the string to be translated according to the current
       locale.  If the current locale is C or POSIX,  the  dollar
       sign   is  ignored.   If  the  string  is  translated  and
       replaced, the replacement is double‐quoted.

Derek


> 
>  ------
>  Patrick Ellis
>  Senior Software Engineer, Roku
>  Get more out of your high-def TV.
>  High-definition photos, art, music and more. http://www.rokulabs.com
> 
> _______________________________________________
> Roku-tech mailing list
> [email protected]
> http://lists.rokulabs.com/mailman/listinfo/roku-tech
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.