Is there a way to run some code in a C-shell script by different shell, like bash?
I have that situation.
I have prepared and perfectly workable bash-skript that now I have to execute under C-shell script, divide it on steps and without creating a new files (with the bash-code parts.)
For example:
Even with so simple statement it is already problems.
I need to execute much more advance and complicated processing!
I guess, the C-shell checking the syntax during the entering bash-code line in order to catch the 'END' line.
Maybe it is possible to disable it (the C-shell checking) and enable it after?
The option to have the code in single quotes is not usefull, too!
By that I would need to escape much: that will hightmаре!
Rewrite the bash script in c-shel - havy and long task!
I see only one option: brake the bash script on bansh of small files and process communication between them through env-variable or temporary files.
I fiddled with it until it worked for me. Quoting the marker in ksh/bash says to not process the included data. I just hoped that csh might get that right too. I don't use csh and I don't know of any great docs for it.
Location: Saint Paul, MN USA / BSD, CentOS, Debian, OS X, Solaris
Posts: 2,288
Thanks Given: 430
Thanked 480 Times in 395 Posts
csh references
Hi.
Many people suggest you avoid csh for scripting, scroll down the page: Csh Programming Considered Harmful. But if you must, consider the items below ... cheers, drl
Linux System having all Perl, Python, PHP (and Ruby) installed
From a Shell script, can call a Perl, Python, PHP (or Ruby ?) file
eg
eg
a Shell script run in a case statement call to run a php file, also Perl or/and Python file???
Like
#!/usr/bin/bash
....
....
case $INPUT_STRING... (1 Reply)
Just began to learn on Shell Script. I got an exercise from my friend. I know how to make this happen in C, but I'm not familiar with Shell Script. Hope I can get some help from all of you.
I want to write a bash script to comment code blocks in a bash source file. What I mean comment is '#', I... (1 Reply)
Hi All,
I have few bash shell scripts which depends on one Ksh shell script. When i run bash shell scripts, it shows error as bad interpretor : ksh no such bad file or directory.
When i tried to install ksh shell, it is not downloading too.
If I remove !/bin/ksh command in starting line of the... (14 Replies)
Say i have a simple example:
root@server # cat /root/scripts/test.sh
while sleep 5
do
echo "how are u mate" >> /root/scripts/test.log
done
root@server #
Instead of using rc.local to start or another script to check status, I would like make it as daemon, where i can do the following:
... (2 Replies)
Hello
I'm having a problem running a TCL script in my new OpenSolaris OS. When I go to the directory containing my script called 'Install' (using the gnome terminal), it doesn't seem to be able to find it even though it lists it i.e. if I type "Inst" and hit tab to complete the word, it... (11 Replies)
Status quo is, within a web application, which is coded completely in php (not by me, I dont know php), I have to fill out several fields, and execute it manually by clicking the "go" button in my browser, several times a day.
Thats because:
The script itself pulls data (textfiles) from a... (3 Replies)
hi,
i have a script that runs on bash and would like to run it on a machine that has csh and bash. the default setting on that machine is csh. i dont want to change my code to run it with a csh shell. is there any way i can run the script (written in bash) on this machine? in other words is there... (3 Replies)
Hi,
I have a sheel script that invokes a perl script...Now, instead havin the perl script as a separate file I'd like put the contents in the sheel script itself...But I am not sure how ro run that perl script contents.please help me
Thanks (1 Reply)