C shell script wont terminated if i don't modify the shebang
Hi all, I'm new to shell script
i wrote some shell script for my colleague, everyone is fine,except on user
we are using VNC viewer to work
and there are some script start with shebang #! /bin/csh
there is an user will not terminate after running the script even if a hello world
i need to ctrl+c to stop the script manually
Below is my hello world
but if i modify the shebang to
it works , and could be terminated normally
I google it and I know that -f means fast , it will ignore the .cshrc and .login
but I tried to remove the .cshrc in his home directory,it still wont be terminated and there's no .login in his home directory
So how can I make user can normally use my script without modify my shebang ?
We are running a quiz and the data collected from the quiz is submitted to the database. My requirement is to write a shell script to get these submitted records.
I should be able to run this shell script at any time and the records it returns should be the ones submitted after the script was... (5 Replies)
Hi,
i am using SuonOS and ksh.
i need to add data into a file(s.txt) using a shell script. i have to pass 3 parameters and these 3 paramaters should add into the file at end of the file.
File s.txt is look like,
---------------------------------
column1|column2|column3
... (1 Reply)
Hi,
I ran a shell script in the foreground but it seems that the shell script teminated when the session expired. Please let me knw if it's possible or hypothesis is incorrect ASAP. (2 Replies)
#!/bin/ksh
echo -en "\033|||'-'))
echo -e "\033
The above script works fine when the interpreter is ksh, but outputs the following error when #!/bin/bash is used as shebang:
test.sh: line 5: syntax error near unexpected token `('
test.sh: line 5: `case "$ACTIVATION_KEY" in +(|||'-'))' (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)
Hi,
As per my understanding, we can use two shebang statements in a single shell script. Please see below snippet-
#!/bin/bash
.......## some code A
#!/bin/csh
.......## some code B
exit 0;
Here, code A will be executed using bash shell and code B will be executed with c shell.
... (9 Replies)
Im using a script that writes a random line to a text file then executes another shell script. My problem is that the lottery shell script will not execute. Im not receiving an errors when running the shell script, and it copies a random line of text to mtest.txt fine.
#!/bin/bash
nscripts=2... (3 Replies)
Hi,
I want a script shell to automate modifying httpd.conf file for
several instances of apache, save httpd.file before changing it, after
modifying it and then restart apache.
- Replace ServerRoot "xxxx" by ServerRoot "yyyy" of all directories :
"... (4 Replies)
I have a shell script running to load some data from a text file to database. Text file contains some non-ASCII characters like ü. How can i convert these characters to UTF-8 codes before loading to DB. (5 Replies)
Hi Guys,
I am very new to shell script and I need your help here to write a script. Actually, I have a script abc.sh which don't get terminated itself. So I need to design a script to run this script, save the output to a file, search for a given string in the output and if it exists send those... (11 Replies)
Discussion started by: Sambit Sahu
11 Replies
LEARN ABOUT DEBIAN
pperl
PPERL(1p) User Contributed Perl Documentation PPERL(1p)NAME
PPerl - Make perl scripts persistent in memory
SYNOPSIS
$ pperl foo.pl
DESCRIPTION
This program turns ordinary perl scripts into long running daemons, making subsequent executions extremely fast. It forks several processes
for each script, allowing many processes to call the script at once.
It works a lot like SpeedyCGI, but is written a little differently. I didn't use the SpeedyCGI codebase, because I couldn't get it to
compile, and needed something ASAP.
The easiest way to use this is to change your shebang line from:
#!/usr/bin/perl -w
To use pperl instead:
#!/usr/bin/pperl -w
WARNINGS
Like other persistent environments, this one has problems with things like BEGIN blocks, global variables, etc. So beware, and try checking
the mod_perl guide at http://perl.apache.org/guide/ for lots of information that applies to many persistent perl environments.
Parameters
$ pperl <perl params> -- <pperl params> scriptname <script params>
The perl params are sent to the perl binary the first time it is started up. See perlrun for details.
The pperl params control how pperl works. Try -h for an overview.
The script params are passed to the script on every invocation. The script also gets any current environment variables, the current working
directory, and everything on STDIN.
Killing
In order to kill a currently running PPerl process, use:
pperl -- -k <scriptname>
You need to make sure the path to the script is the same as when it was invoked.
Alternatively look for a .pid file for the script in your tmp directory, and kill (with SIGINT) the process with that PID.
ENVIRONMENT
pperl uses the PPERL_TMP_PATH environment variable to determine the directory where to store the files used for inter-process
communication. By default, the subdirectory .pperl of the user's home directory is used.
BUGS
The process does not reload when the script or modules change.
$^S is not represented identically with respect to perl, since your script will be run within an eval block
AUTHOR
Matt Sergeant, matt@sergeant.org. Copyright 2001 MessageLabs Ltd.
SEE ALSO
perl. perlrun.
perl v5.14.2 2011-11-15 PPERL(1p)