Results 1 to 5 of 5

Thread: How to edit and compile shell scripts

  1. #1
    Join Date
    Nov 2009
    Posts
    359

    How to edit and compile shell scripts

    Hi
    Is there software for UNIX, with which to compile shell scripts to see if it works or not and can detect errors. A similar program like eclipse for java. I am not aware of such programs but I think there should be something like that. Thanks in advance.

  2. #2
    Join Date
    May 2008
    Posts
    2,012

    Re: How to edit and compile shell scripts

    Hi
    Is there software for UNIX, with which to compile shell scripts to see if it works or not and can detect errors.
    Shell scripts do "compile" step, But in order to assess script you can use emacs like software that evaluates parts of scripts. The evaluating a script goes through phases of testing. Any more information needed do post back.

  3. #3
    Join Date
    May 2008
    Posts
    2,297

    Re: How to edit and compile shell scripts

    Hi
    For editing, you have the choice: gedit, nano, vim, emacs ... (all of them support the syntax), there are plenty of other editors
    Browsing through the manual online bashdb, I came across a tip that gives the author, who is to customize PS4:
    Code:
    PS4 ='(${ BASH_SOURCE): $ (LINENO)) ($ funcname [0]) - [$ SHLVL (), $ (BASH_SUBSHELL), $?]
    It is at once a little clearer that the '+' above. For my part, I got color, and I made a script executable: Debugging.sh
    Code:
    PS4 = '\ [\ e [00; 36m \] [line: $ (LINENO) = $? - ($ funcn [0]: + func: ($ funcn [0]) - $ (BASH_SRC))] \ [\ e [00m \] - \ [\ e [00; 33m \] (SUBSHL: $ (BASH_SUBSH ) SHLVL: $ SHLVL ()) \ [\ e [00m \]'
    set-x
    I source in the script that I want 'debugger'. Otherwise, there geany editor Which can also write and execute scripts.

  4. #4
    Join Date
    May 2008
    Posts
    2,389

    Re: How to edit and compile shell scripts

    Hi
    Is there software for UNIX, with which to compile shell scripts to see if it works or not and can detect errors. A similar program like eclipse for java.
    I think there is a tool to "compile" a script, it is not true that compiles seen but it is not possible to protect its code if needed (long live opensource).

  5. #5
    Join Date
    Feb 2008
    Posts
    1,852

    Re: How to edit and compile shell scripts

    Hello.
    Shell scripts do "compile" step .
    Exactly, scripts are written in languages directly interpreted by the shell.
    If evaluating a script goes through phases of testing .
    I'll provide some clarification, since the author does not seem to be aware of how a script works.
    The script is interpreted by the shell (command interpreter), he must be given execute permissions (chmod + x example or chmod u + x example if you want the enforcement is possible only by the owning user).
    Then to run the script, it must be . / example.
    there is a tool to "compile" a script is not true that compiles seen but it is not possible to protect its code if needed (long live opensource)
    We can not talk about compiling but encryption IMHO. Hope this info helps you.

Similar Threads

  1. Why some scripts start with #
    By New buDDy in forum Operating Systems
    Replies: 3
    Last Post: 14-10-2009, 09:44 PM
  2. Greasemonkey scripts safe?
    By gvBlake in forum Technology & Internet
    Replies: 3
    Last Post: 01-09-2009, 12:04 AM
  3. Scripts are usually safe. Do you want to allow scripts to run ?
    By Ebadaah in forum Technology & Internet
    Replies: 4
    Last Post: 02-07-2009, 12:10 PM
  4. How to Run Shell Scripts ?
    By Denisez in forum Tips & Tweaks
    Replies: 1
    Last Post: 28-03-2009, 12:52 PM
  5. Replies: 1
    Last Post: 06-11-2007, 02:18 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,718,193,312.91381 seconds with 16 queries