This is the old SliTaz forum - Please use the main forum.slitaz.org

[solved]Package for c shell?
  • JingJing April 2010
    I am new to Slitaz and Linux. When I try to install a program that I would like to use the "install.sh" installer comes with the software generates error:

    -bash: install.sh: command not found

    I took a look at the script and it starts with:

    ! /bin/csh -f

    As I understand, I need "c shell". I checked with Slitaz handbook. I found mentioning of ash an bash. I do not see c shell? I searched packages using "csh" and "c shell" and got no results.

    How do I install csh so I can install this program?

    Thanks!
  • cavalier911cavalier911 April 2010
    Become root verify install.sh is executable

    If install.sh is in a location not in your
    echo $PATH


    then precede install.sh with a period and forward slash.

    root@slitaz: ./install.sh
  • JingJing April 2010
    Thanks. I did make sure the .sh file is executable and I run it from its directory.

    The install.sh still does not work.

    I google searched for this issue and tried something like this, as root:

    rm -f /bin/sh
    ln -s /bin/bash /bin/sh

    Maybe I should not try something like that without being fully aware of what it does, I had assumed it simply linked /bin/sh to /bin/bash. Anyway, here is what I got now:

    bash: ./install.sh: /bin/csh: bad interpreter: No such file or directory

    It is a differnet error message. It now complains directly about the /bin/csh part in the installation script? Do I need csh?
  • seawolfseawolf April 2010
    Instead of removing it, install the bash package over the top of sh (which is actually provided by busybox). You can get it back, then.

    pkgs.slitaz.org does not show any package containing CSh :(
    You do need csh, but could try editing to #!/bin/bash and running it through bash. May fail as the two shells may use different logic, syntax etc.

    There is TCSh, the improved C shell which has overtaken CSh. That's not on SliTaz at the moment, either.

    Could you perhaps copy the /bin/csh ot /bin/tcsh executable from another distro? Last resort!
  • JingJing April 2010
    Thanks for the explanation. So apparently indeed Slitaz does not have csh or tcsh.

    The idea of copying over a .bin.csh sounds interesting. Let me also take a look at the script iteself to see how much of a work I need to do to modify it to use bash. Maybe it is too hard for me as a newbie.

    I am wondering why Slitaz does not provide csh/tcsh...

  • erniaernia April 2010
    http://en.wikipedia.org/wiki/Shebang_%28Unix%29
    did you try if the script works with bash too?
  • JingJing April 2010
    Thanks for trying to help me again ernia. Yes I modified the script to use bash and immediatly running into another issue. The shell script calls an installer.tcl and that failed. I opened another topic for discussion.
  • JingJing April 2010
    Just to report that I followed a suggestion from another post and installed zsh.

    Indeed zsh went further than bash when running the original script that is meant for csh.

    I still got many "parse error" as basic things like "while loop" or "case statement" are just different.

    I have zero shell programming experience and I am trying to do as much as I can....converting the old csh script to fit bash or zsh syntax.
  • seawolfseawolf April 2010
    Hi --

    I got the source code for tcsh, the improved but fully-compatible c shell, and it compiled on my SliTaz 3 out-of-the-box! Here's the compiled binary to drop in to /usr/local/bin/tcsh.

    http://rapidshare.com/files/375566673/tcsh.html
    MD5: 43B76D377CCCC5082623D73EFEB351D4

    As I say, you could compile the source code yourself; just: ./configure && make and `make install` as root,
    and modify the script to point to that program / symlink it.

    It's a very easy one!

    HIH :)
  • JingJing April 2010
    Thanks a lot for that. I will try it out tonight!

  • JingJing April 2010
    Thanks again. The csh/tcsh works and the script now runs! I have other issues with the program. But as far as csh is concerned, the problem is solved.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

SliTaz Social