How can I port same shell script in to different shells like C Shell, K Shell and Bourne Shell Chitta
How can I port same shell script in to different shells like C Shell, K Shell and Bourne Shell Chitta
XXXX@XXXXX.COM writes: Launching your favorite editor, reading the man page of the source and the target shell, thinking, and editing the script file. Also, it's possible to write a single source file usable both in csh, sh, Fortran and C, and perhaps it would be possible to add more languages, so you would not need to "port" the script... happy.source: ------------------------------------------------------------------------ cat /*dev/null; echo "Happy New Year"\! cat <<c*/ /*dev/null | cat > /dev/null c */ () {} /* c */ main() { cat(); printf("Happy New Year!\n"); } /* 17 format('Happy New Year!') write (6,17) stop end c*/ ------------------------------------------------------------------------ Makefile: ------------------------------------------------------------------------ all: happy-c happy-f happy-sh happy-csh happy-c:happy.source Makefile @ cp happy.source happy-c.c @ gcc -o happy-c happy-c.c @ echo -n '(C) ' @ ./happy-c || true happy-f:happy.source Makefile @ cp happy.source happy-f.f @ f77 -o happy-f happy-f.f 2> /dev/null @ echo -n '(FORTRAN) ' @ ./happy-f happy-sh:happy.source Makefile @ cp happy.source happy-sh @ echo -n '(Bourne Shell) ' @ chmod 755 happy-sh @ sh ./happy-sh happy-csh:happy.source Makefile @ cp happy.source happy-csh @ chmod 755 happy-csh @ echo -n '(C Shell) ' @ csh ./happy-csh clean: -rm -f *.o *~ happy-csh happy-sh happy-f happy-f.f happy-c happy-c.c ------------------------------------------------------------------------ -- __Pascal Bourguignon__ http://www.**--****.com/ In a World without Walls and Fences, who needs Windows and Gates?
* Pascal Bourguignon < XXXX@XXXXX.COM > | happy.source: kEWl, D00dE. R'
Since the KornShell was designed to be a compatible replacement of the Bourne Shell, it's easy to write a script that runs with both shells. Just limit yourself to the Bourne Shell constructs, which are understood by both shells. The C-Shell is something completely different, inventing a completely independent command language. The Bourne Shell and C-Shell command sets are disjoint by a large degree. The following script shows, that it still is possible to use all together in one script: http://www.**--****.com/ Heiner -- ___ _ / __| |_ _____ _____ _ _ Heiner STEVEN < XXXX@XXXXX.COM > \__ \ _/ -_) V / -_) ' \ Shell Script Programmers: visit |___/\__\___|\_/\___|_||_| http://www.**--****.com/
1.Run Unix/Linux shell script from VB.NET
I believe I got this under VB6 but not sure if we can runUnix shell script from a VB.NET application Your help is greatly appreciated. Bill
2.Run Unix shell script from VB.NET
I have the need to run couple Unix shell scripts (in IBM AIX box) from a VB.NET windows app. Please help! Thanks a million. Bill
3.Running unix shell script from remote java app
Hi everyone, My problem is, A have created a simple tool to run a shell scipt located on a remote unix server via a ssh2 session (using ganymed-ssh2 library). The output from this script when run from my java tool differs to the output when the shell script is run directly on the server, some of the output is not displayed, it seems so far that output generated in functions contained in the shell script, or generated in loops in the shell script are not displayed when run from my java tool. As an attempted work around I created a wrapper sell script which was suppossed to redirect the out put from the script into a tmp file, and the java task read directly from that file- The strange thing is that, I get the same problem, when I run the wrapper from unix, correct output in tmp file is generated, when I run the warpper from my java tool, not all output is generated in tmp file. This seems like really strange behaviour to me, as anyone experienced something like this before? Basically the reason for the tool , is that we can not allow certain junior employees to log onto client machines, however we need them to be able to run certain scripts already located on the server. - Any help or ideas would be greatly appreciated.
4.Running a Unix Shell Script from VBscript
Is there a way from WSH/VBscript to a) Remotely run a unix shell script on a unix server? b) Pass arguments to the script c) Detect the unix scripts exit status. Any help/pointers appreciated -- JL
5.Coding an SFTP step in a Unix Script running F-Secure Shell
Hello, I am not able to get a script to run using SFTP that will work. I looked and looked and cannot find any specific code to do this. I am running on AIX 5.1 and have successfully executed the ssh-keygen command that created keys on both the source and target servers. Still failing. Any help would be GREATLY appreciated. Thanks,
6. Run Script From Comp.Unix.Shell FAQ - Not Interpreting Commands
7. how to run your tcsh shell script in the new shell
8. how to easily determine shell script is running in background from within script
Users browsing this forum: No registered users and 38 guest