element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Autodesk EAGLE
  • Products
  • More
Autodesk EAGLE
EAGLE User Chat (English) Executing commands from the command line that contain spaces
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Autodesk EAGLE to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 2 replies
  • Subscribers 172 subscribers
  • Views 329 views
  • Users 0 members are here
Related

Executing commands from the command line that contain spaces

Former Member
Former Member over 13 years ago

After an exhaustive search through the manual and help files, I'm still

stumped.

 

I'm trying to execute a command that contains a space:

 

    > eagle -C "run panelize;" myboard.brd

 

Eagle is interpreting the space inside the command as a separator

causing a list of ulp's to be presenting and opening the board

"panelize;.brd".

 

I even tried the example in Help->Command Line Options:

 

   eagle -C "window (1 1) (2 2);" myboard.brd

 

which doesn't work either.  In this case, it opens "(1.brd", again

interpreting the embedded space as a command line separator.  It's as if

eagle is concatenating all of the argv[]'s then parsing them as a single

string, disregarding what the shell has provided.

 

I have also tried single quotes, and backslashes preceding the spaces to

no avail.

 

Eagle 5.11.0

Linux kernel 2.6.37 on x86_64

Bash version: 4.1.10

 

Any ideas as to why

 

Thanks,

    - Chuck

 

  • Sign in to reply
  • Cancel
  • kcadsoft
    kcadsoft over 13 years ago

    On 08/16/11 15:13, Chuck Huber wrote:

    After an exhaustive search through the manual and help files, I'm still

    stumped.

     

    I'm trying to execute a command that contains a space:

     

         >  eagle -C "run panelize;" myboard.brd

     

    Eagle is interpreting the space inside the command as a separator

    causing a list of ulp's to be presenting and opening the board

    "panelize;.brd".

     

    I even tried the example in Help->Command Line Options:

     

        eagle -C "window (1 1) (2 2);" myboard.brd

     

    which doesn't work either.  In this case, it opens "(1.brd", again

    interpreting the embedded space as a command line separator.  It's as if

    eagle is concatenating all of the argv[]'s then parsing them as a single

    string, disregarding what the shell has provided.

     

    I have also tried single quotes, and backslashes preceding the spaces to

    no avail.

     

    Eagle 5.11.0

    Linux kernel 2.6.37 on x86_64

    Bash version: 4.1.10

     

    Works just fine here (also on Linux).

     

    Maybe your shell doesn't handle double quotes correctly?

     

    What does

     

       echo "a         b"

     

    (several blanks between a and b) give you? Is it

     

       a         b

     

    or

     

       a b

     

    Klaus Schmidinger

    --

    _______________________________________________________________

     

    Klaus Schmidinger                       Phone: +49-8635-6989-10

    CadSoft Computer GmbH                   Fax:   +49-8635-6989-40

    Pleidolfweg 15                          Email:   kls@cadsoft.de

    D-84568 Pleiskirchen, Germany           URL:     www.cadsoft.de

    _______________________________________________________________

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 13 years ago in reply to kcadsoft

    On 08/16/2011 10:39 AM, Klaus Schmidinger wrote:

    On 08/16/11 15:13, Chuck Huber wrote:

    >> After an exhaustive search through the manual and help files, I'm still

    >> stumped.

    >>

    >> I'm trying to execute a command that contains a space:

    >>

    >>      >  eagle -C "run panelize;" myboard.brd

    >>

    >> Eagle is interpreting the space inside the command as a separator

    >> causing a list of ulp's to be presenting and opening the board

    >> "panelize;.brd".

    >>

    >> I even tried the example in Help->Command Line Options:

    >>

    >>     eagle -C "window (1 1) (2 2);" myboard.brd

    >>

    >> which doesn't work either.  In this case, it opens "(1.brd", again

    >> interpreting the embedded space as a command line separator.  It's as if

    >> eagle is concatenating all of the argv[]'s then parsing them as a single

    >> string, disregarding what the shell has provided.

    >>

    >> I have also tried single quotes, and backslashes preceding the spaces to

    >> no avail.

    >>

    >> Eagle 5.11.0

    >> Linux kernel 2.6.37 on x86_64

    >> Bash version: 4.1.10

     

    Works just fine here (also on Linux).

     

    Maybe your shell doesn't handle double quotes correctly?

     

    What does

     

      echo "a         b"

     

    (several blanks between a and b) give you? Is it

     

      a         b

     

    or

     

      a b

     

    I get the spaces.  It's the standard Bourne-again shell - "bash" - that

    ships with most distributions.  Recall that it doesn't work with single

    quotes, nor with escaped spaces.

     

    ...

     

    I found it.  /usr/local/bin/eagle is a shell script that launches eagle

    from it's installed tree.  It's the first "eagle" in $PATH and amounts to:

     

        exec /opt/eagle-5.11.0/bin/eagle $*

     

    It should be:

     

        exec /opt/eagle-5.11.0/bin/eagle "$@"

     

    Maybe this revelation, found buried deep within the man pages, will help

    someone else.

     

    Enjoy,

        - Chuck

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube