Sponsored Content
Top Forums Shell Programming and Scripting Why does my /bin/csh take longer than /bin/perl? Post 302275841 by cfajohnson on Monday 12th of January 2009 09:59:06 AM
Old 01-12-2009
Quote:
Originally Posted by acheong87
Okay, so I have two "Hello, world!" scripts, "test.pl" and "test.sh".
Code:
#!/bin/perl -w
use strict;
print "Hello, world!\n";

Code:
#!/bin/csh
echo Hello,\ world!

When I run test.pl, it runs instantly, always. When I run test.sh, it takes anywhere between 4 and 22 seconds!

The same script is a shell that is designed for scripting (i.e., a POSIX shell, such as bash, ash, dash or ksh) takes much less time than csh and quite likely less than perl.

Top Ten Reasons not to use the C shell
Csh problems
Csh Programming Considered Harmful
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

/bin/sh: /usr/bin/vi: No such file or directory when doing crontab

I just set up an ftp server with Red Hat 5.2. I am doing the work, I'm baby stepping, but it seems like every step I get stuck. Currently, I'm trying to set up a crontab job, but I'm getting the following message: /bin/sh: /usr/bin/vi: No such file or directory. I see that vi exists in /bin/vi,... (3 Replies)
Discussion started by: kwalter
3 Replies

2. Shell Programming and Scripting

CSH CGI-BIN question ?

Hi, 1. How to Write csh CGI-BIN script which return a web page which show the environment of the executed script ? 2. How do we read command line on csh and ksh ? Thank's (2 Replies)
Discussion started by: 7eleven
2 Replies

3. UNIX for Dummies Questions & Answers

Difference between /bin, /usr/bin, /sbin ?

Hi All, Can somebody tell me the difference between /bin, /usr/bin, /sbin ? Thanx in advance, Saneesh Joseph (3 Replies)
Discussion started by: saneeshjose
3 Replies

4. Shell Programming and Scripting

#/usr/bin/csh -f not working as expected?

Hey everyone, A coworker of mine has written a csh script that starts with #!/usr/bin/csh -f. It's my understanding that the -f should skip the .cshrc and .login files, but here's the problem: In the script "line" is used, and I happen to have a "line" in my ~/bin. When the script is ran my... (4 Replies)
Discussion started by: effigy
4 Replies

5. UNIX for Dummies Questions & Answers

fuser: difference with bin/sh and bin/ksh shell script

Hi, I have a problem I don't understand with fuser. I launch a simple shell script mysleep.sh: I launch the command fuser -fu mysleep.sh but fuser doesn't return anything excepted: mysleep: Then I modify my script switching from #!/bin/sh to #!/bin/ksh I launch the command fuser -fu... (4 Replies)
Discussion started by: Peuj
4 Replies

6. Shell Programming and Scripting

#!/bin/csh -f :: What does it mean

Hi, I have a script which I need to modify. It contains the following statement at the beginning - 1. What does this mean ? #!/bin/csh -f 2. If I run the following code in a script on C SHELL it runs normally. host=0 if ; then host="<<something>>" fi But, in the script... (7 Replies)
Discussion started by: angshuman_ag
7 Replies

7. OS X (Apple)

When to use /Users/m/bin instead of /usr/local/bin (& whats the diff?)?

Q1. I understand that /usr/local/bin means I can install/uninstall stuff in here and have any chance of messing up my original system files or effecting any other users. I created this directory myself. But what about the directory I didn't create, namely /Users/m/bin? How is that directory... (1 Reply)
Discussion started by: michellepace
1 Replies

8. AIX

Redistribution bin required for AIX. j7r164redist.7.1.0.25.bin

Hi, I am planning to install a version of Informatica on my AIX box. It requires a specific java build in pap6470_27sr2-20141101_01(SR2). The current link for IBM 64-bit SDK for AIX®, JavaTM Technology Edition, Version 7 Release 1 has a more recent version in j7r164redist.7.1.0.75.bin. Is... (4 Replies)
Discussion started by: meetpraveens
4 Replies

9. UNIX for Beginners Questions & Answers

source the csh into the bin/sh

I tried to source the csh file into the bin/sh(input file is srcinput.sh ). Its(csh -f ...csh) not working. I tried to source like csh -f D:/sample/expand/env.csh env.csh sets the environment and it source another .csh file using source fname.csh. fname.csh it sets one... (2 Replies)
Discussion started by: SA_Palani
2 Replies

10. Shell Programming and Scripting

Usage of #!/bin/sh vs #!/bin/bash shell scripts?

Some question about the usage of shell scripts: 1.) Are the commands of the base shell scripts a subset of bash commands? 2.) Assume I got a long, long script WITHOUT the first line. How can I find out if the script was originally designed für "sh" or "bash"? 3.) How can I check a given... (3 Replies)
Discussion started by: pstein
3 Replies
IGAWK(1)							 Utility Commands							  IGAWK(1)

NAME
igawk - gawk with include files SYNOPSIS
igawk [ all gawk options ] -f program-file [ -- ] file ... igawk [ all gawk options ] [ -- ] program-text file ... DESCRIPTION
Igawk is a simple shell script that adds the ability to have ``include files'' to gawk(1). AWK programs for igawk are the same as for gawk, except that, in addition, you may have lines like @include getopt.awk in your program to include the file getopt.awk from either the current directory or one of the other directories in the search path. OPTIONS
See gawk(1) for a full description of the AWK language and the options that gawk supports. EXAMPLES
cat << EOF > test.awk @include getopt.awk BEGIN { while (getopt(ARGC, ARGV, "am:q") != -1) ... } EOF igawk -f test.awk SEE ALSO
gawk(1) Effective AWK Programming, Edition 1.0, published by the Free Software Foundation, 1995. AUTHOR
Arnold Robbins (arnold@skeeve.com). Free Software Foundation Nov 3 1999 IGAWK(1)
All times are GMT -4. The time now is 06:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy