Results 1 to 5 of 5
Ok. This is what I did in the Shell console ... (Linux Kanotix Live CD - not installed in my hard drive)
knoppix@1[knoppix]$ csh
bash: csh: command not found
Actually ...
- 08-03-2006 #1Just Joined!
- Join Date
- Aug 2006
- Posts
- 3
Debian C Shell compilation problem
Ok. This is what I did in the Shell console ... (Linux Kanotix Live CD - not installed in my hard drive)
knoppix@1[knoppix]$ csh
bash: csh: command not found
Actually I hope someone can help me just to compile and execute one very simple 'Hellow World' C shell program ... and I will be eternally grateful ... I really mean it.
Thanks
- 08-03-2006 #2Linux Engineer
- Join Date
- Apr 2006
- Location
- Saint Paul, MN, USA / CentOS, Debian, Solaris, SuSE
- Posts
- 1,065
Hi, cyberquest.
Welcome to the forum.
Are you trying:
1) to run a shell script or
2) to compile a program that you have (or want to write) that is in the language c?
The specific error message that you received is telling you that csh is not available to you on your system. The csh is a command processor -- you give it commands and it tries to run them. You're already using a shell -- bash -- that's where you tried to run csh.
Tell us more about what you are trying to do and we'll try to help ... cheers, drlWelcome - get the most out of the forum by reading forum basics and guidelines: click here.
90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
We look forward to helping you with the challenge of the other 10%.
( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )
- 08-03-2006 #3Just Joined!
- Join Date
- Aug 2006
- Posts
- 3
C Shell Hello World Program
It is choice number 1 ... to run a C shell script from Linux ... (I know the difference between C programming and C shell scripting)
So the shell console said I don't have C shell in my system, rite? Or perhaps is it disable somewhere and I should enable it?
Or perhaps I should download and install the c shell compiler somewhere and may I know what is the procedure??
All I wanna do is just to run a Hello World msg in C shell and man ... I have been posting in this forum for a few days and still I can't find the answers.
But anyway, thanks for the help. Pls, if anyone can comment something .. pls help me bcoz I am a newbie to linux
- 08-03-2006 #4
If you had a fully installed linux, rather than a live cd,
csh would probably be installed on your system.
Try another flavor of live cd, one that has csh.
http://www.aurox.org/live-generator/...=index&lang=en
- 08-03-2006 #5Linux Engineer
- Join Date
- Apr 2006
- Location
- Saint Paul, MN, USA / CentOS, Debian, Solaris, SuSE
- Posts
- 1,065
Hi.
OK, so you're trying to run a script in csh. If rcgreen is right and you are using a LiveCD, then follow his advice. You could also try using tcsh, a relative of csh. If you have an installed system, then you can try the suggestions below.
The error message you got suggests that it is not in your system. You can try
to see if it is installed, but perhaps not in your path. For example, I'll show you what this would look like for tcsh (because I tend to use that for interactive work):Code:which csh locate csh
This showed me that tcsh is on my system and where it is.Code:% whereis tcsh tcsh: /bin/tcsh /usr/bin/tcsh /usr/share/man/man1/tcsh.1.gz
The locate command tends to produce a lot of lines because it looks for -- in my case -- tcsh in any path, so I got over 100 lines from that.
If it is installed, then you need to arrange to have in your path or to execute it with the complete pathname.
If csh is not on your system, you need to install it. In Debian you can do that easily with apt-get, which downloads and installs. You need to be root in order to do this. Below are the results of doing that as a simulation on my system. If you do this and it looks right, then you can remove the "-s" and try it for real. PLEASE NOTE -- although this is easy, doing installs and removes can render a system unusable, and you may need to re-install in some situations. Be careful, read all messages, and don't do anything that appears dangerous.
For more information, see your man pages, particularly man apt-get (although it is quite long and complicated).Code:# apt-get -s install csh Reading Package Lists... Done Building Dependency Tree... Done The following NEW packages will be installed: csh 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Inst csh (20050313-1 Debian:testing) Conf csh (20050313-1 Debian:testing)
There are other package managers available, but apt-get is fast and easy. Other folks here may have some suggestions as well.
(As an aside, I do not recommend using csh family for scripting; you can Google for an article csh considered harmful to see the details.)
Best wishes ... cheers, drlWelcome - get the most out of the forum by reading forum basics and guidelines: click here.
90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
We look forward to helping you with the challenge of the other 10%.
( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )


Reply With Quote
