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 & Partners
    Products & Partners
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • 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
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • 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 & Partners
  • More
Autodesk EAGLE
EAGLE Support (Deutsch) 'system' cannot properly start Linux shell scripts
  • 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 8 replies
  • Subscribers 188 subscribers
  • Views 1250 views
  • Users 0 members are here
Related

'system' cannot properly start Linux shell scripts

e14 Contributor
e14 Contributor over 15 years ago

I cannot get my EAGLE 5.11.02 (Linux) to properly execute shell scripts

with parameters: The shell script 'test.sh' contains the lines

   #!/bin/bash

   echo parameter=[$1]

and, when manually executed via

   . test.sh abc

correctly outputs the text

   parameter=[abc]

 

So far, so good. From EAGLE, using the ULP syntax

   system(". test.sh abc");

by some reason only outputs

   parameter=[]

 

Is there any logical reason why EAGLE should behave that way? Do I make

wrong assumptions somewhere (I normally do NOT use Linux and therefore

do NOT know too much about it)? I'm currently trying this on

   Ubuntu 10.04 LTS - Lucid Lynx.

 

Andreas Weidner

 

 

  • Sign in to reply
  • Cancel
Parents
  • e14 Contributor
    e14 Contributor over 15 years ago

    Am 11.09.2011 18:55, schrieb Andreas Weidner:

    I cannot get my EAGLE 5.11.02 (Linux) to properly execute shell scripts

    with parameters: The shell script 'test.sh' contains the lines

    #!/bin/bash

    echo parameter=[$1]

    and, when manually executed via

    . test.sh abc

    correctly outputs the text

    parameter=[abc]

     

    So far, so good. From EAGLE, using the ULP syntax

    system(". test.sh abc");

    by some reason only outputs

    parameter=[]

     

    Is there any logical reason why EAGLE should behave that way? Do I make

    wrong assumptions somewhere (I normally do NOT use Linux and therefore

    do NOT know too much about it)? I'm currently trying this on

    Ubuntu 10.04 LTS - Lucid Lynx.

     

    Andreas Weidner

     

     

    Why would you want to source the script from withing the system()?

    How about using system("test.sh abc") or system("./test.sh abc")?

     

    I mean, the . (source) is only useful, when you want to put the

    parameter into your current environment.

     

    main() { system(". test.sh abc"); } behaves like the behaviour you describe.

     

    --

    Christoph

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • e14 Contributor
    e14 Contributor over 15 years ago

    Am 11.09.2011 18:55, schrieb Andreas Weidner:

    I cannot get my EAGLE 5.11.02 (Linux) to properly execute shell scripts

    with parameters: The shell script 'test.sh' contains the lines

    #!/bin/bash

    echo parameter=[$1]

    and, when manually executed via

    . test.sh abc

    correctly outputs the text

    parameter=[abc]

     

    So far, so good. From EAGLE, using the ULP syntax

    system(". test.sh abc");

    by some reason only outputs

    parameter=[]

     

    Is there any logical reason why EAGLE should behave that way? Do I make

    wrong assumptions somewhere (I normally do NOT use Linux and therefore

    do NOT know too much about it)? I'm currently trying this on

    Ubuntu 10.04 LTS - Lucid Lynx.

     

    Andreas Weidner

     

     

    Why would you want to source the script from withing the system()?

    How about using system("test.sh abc") or system("./test.sh abc")?

     

    I mean, the . (source) is only useful, when you want to put the

    parameter into your current environment.

     

    main() { system(". test.sh abc"); } behaves like the behaviour you describe.

     

    --

    Christoph

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
  • e14 Contributor
    e14 Contributor over 15 years ago in reply to e14 Contributor

    Am 13.09.2011 11:08, schrieb Christoph Kukulies:

    Why would you want to source the script from withing the system()?

     

    I do not understand your question (I understand the WORDS, but not the

    MEANING).

     

    How about using system("test.sh abc") or system("./test.sh abc")?

     

    See below.

     

    I mean, the . (source) is only useful, when you want to put the

    parameter into your current environment.

     

    As stated, I do not know Linux well. Therefore, I first test things from

    inside the shell, and afterwards try them with EAGLE's 'system' command.

    From the shell, typing

       test.sh abc

    didn't work at all. Neither did

       ./test.sh abc

    (both just produce NOTHING but error messages). Absolutely the ONLY

    thing that DID work from inside the shell was

       . test.sh abc

    which, unfortunately, doesn't work together with the 'system' command.

     

    Thanks for the tips, though. When I'm feeling extremely well and dare to

    boot into the overly confusing Linux the next time, I'll check whether

    your two suggestions work. If they DO, things are just getting even MORE

    confusing with Linux, because that would not only mean that there are

    cases when things work in the shell and NOT from EAGLE, but also the

    other way round. VERY strange.

     

    Andreas Weidner

     

    • 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 © 2026 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.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube