Edit config file on Raspberry Pi

cdfizz17
2022-02-03
2022-02-14
  • cdfizz17 - 2022-02-03

    Hi,

    I'm having trouble editing a configuration file using the SysProcess library.
    I have followed advice and added the following to CODESYSControl_User.cfg:

    [SysProcess]
    Command.0=shutdown
    Command.1=sed
    

    I tested my code using the shutdown command, and this was successful. The sed command does not work, instead returns code 25.

     

    Last edit: cdfizz17 2022-02-03
  • cdfizz17 - 2022-02-14

    I have found the issue. SysProcess.SysProcessExecute has a restriction on allowed characters. Only alpha numeric and the following are allowed:

    .-+_ :/>"

    So my code does not work due to the '#' symbol.

     

Log in to post a comment.