bug-gnucobol
[Top][All Lists]
Advanced

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

Re: [Bug-GnuCOBOL] spaces in repository name


From: James K. Lowden
Subject: Re: [Bug-GnuCOBOL] spaces in repository name
Date: Fri, 26 Apr 2019 10:43:49 -0400

On Thu, 25 Apr 2019 16:53:18 -0700
Ron Glazier <address@hidden> wrote:

> I am trying to add a file using touch but the repository file name has
> a spaces in it.

The best advice is: don't.  Really.  Spaces in the name will create
many headaches, all avoidable.  

> how to get echo command to create file contained
> within single quotes like this   echo 'RPM Sphere x86_64.repo'
> as this will create a file name that includes the single quotes in the
> above directory.

Your question is about shell quoting, which is OT here.  It's a
worthwhile investment to study the shell.  Many people like the
O'Reilly books, e.g. http://shop.oreilly.com/product/9780596009656.do. 

To offer a few clues: 

        $ echo 'RPM Sphere x86_64.repo'

will echo the text and not the quotes, because the shell removes the
quotes before handing the argument to the echo command.  

        $ touch 'RPM Sphere x86_64.repo'

might do what you want.  

        $ echo " 'RPM Sphere x86_64.repo' "

will echo the string with single-quotes, because the shell removes only
the outermost layer.  That could be what you want, if you're assigning
the name to a variable and expanding it laster, unquoted.  

HTH.  

--jkl



reply via email to

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