Results 1 to 4 of 4

Thread: Bash syntax

  1. #1
    Join Date
    Jun 2008
    Location
    South-West France
    Posts
    1,069

    Default Bash syntax

    Hello.
    Is there any syntax analyzer for bash script.

    In /etc/profile.local I source two files. One for exporting environment variables, the other one for exporting functions.
    It seems that there is a problem with one function.
    This function does not appear offending when some script is run from command line. All of the 78 functions are sourced from the file.
    This function appear to be offending when some script is started from shortcut on user's desktop. Only the first two functions (from 78 ) are sourced from the file. Removing the third one prevent problem, but that function is not available.

    I would like to dig further.

    Any help is welcome.
    Thanks for helping. JCD
    __________
    server leap 15.0 -- ASUS g75vw KDE leap 15.0 -- ASUS g750JZ Optimus KDE leap 15.1 -- acer aspire s13 win 10 home -- HP Omen win 10 home - scan EPSON V500 - Brother HL2250DN - Samsung CLP-325W

  2. #2
    Join Date
    Jan 2017
    Location
    Nürnberg, Germany
    Posts
    202

    Default Re: Bash syntax

    I found the discussion over at stackoverflow about syntax-checking shell scripts informative. Maybe you can try what’s recommended there on your script. Cheers!

  3. #3
    Join Date
    Jun 2008
    Location
    South-West France
    Posts
    1,069

    Default Re: Bash syntax

    Quote Originally Posted by unix111 View Post
    I found the discussion over at stackoverflow about syntax-checking shell scripts informative. Maybe you can try what’s recommended there on your script. Cheers!
    Thank you very much.
    Thanks for helping. JCD
    __________
    server leap 15.0 -- ASUS g75vw KDE leap 15.0 -- ASUS g750JZ Optimus KDE leap 15.1 -- acer aspire s13 win 10 home -- HP Omen win 10 home - scan EPSON V500 - Brother HL2250DN - Samsung CLP-325W

  4. #4
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,447
    Blog Entries
    2

    Default Re: Bash syntax

    At the bottom of my Wiki page for really, really basic BASH for beginners,
    I provide a link to Shell Check, an online lint tool.

    https://en.opensuse.org/User:Tsu2/Re...tuff_Scripting

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •