I have a very basic bash shell script, which has many "while... done; for .... done" loop clauses, like the following
~~
#!/bin/bash
while blablalba; do
....
done < /tmp/file
for line in `cat blablabla`; do grep $line /tmp/raw ; done > /tmp/1;
while blablalba2; do
....
done <... (2 Replies)
hello. we are porting over from HPUX Shell to Linux.
my default shell is bash so i can no longer schedule to execute a sh script in crontab.
can anyone pls help me out? I searched the site but didnt find any details.
thanks! (1 Reply)
I typed:
echo "echo hi > at_log.txt" | at now +1minute
to test the at command on my terminal. I got the message:
job 8 at Thu Feb 25 18:42:00 2010
I waited for a minute but nothing happened. I tried listing at_log.txt, but it said there was no such file. Am I doing something... (2 Replies)
Hi all!
I am trying to write a script that will check if a certain directory is available at several different nodes and then do stuff in it .....
On the beginning of the script I give as a variable the directory and the number of the nodes and then I loop like this:
for... (3 Replies)
Hi All,
I am trying to write a simple bash script.
rm -f File1
I saved this as test.sh
Now when I want to execute it, I type ./test.sh
It gives me error "command not found"
What I am doing incorrect here? Do I have to add anything in script like
#!/bin/bash (5 Replies)
I just can't figure it out , so please just give me a pice of advise how to:
The existing Linux program foo2bar takes as its only argument the name of a single foo file and converts it to an appropriately-named bar file. Provide a script that when executed will run foo2bar against all foo... (4 Replies)
Hi
I have a bash script which takes parameters
sh /tmp/gdg.sh -b BASE-NAME -n 1 -s /source/data -p /dest/data/archive -m ARC
gdg.sh will scan the /source/data and will move the contents to /dest/data/archive after passing through some filters. Its working superb from bash
I have... (0 Replies)
In a bash script I have:
LSCMD="find /project/media/ -mindepth 2 -maxdepth 2 -name \"files*pkg\""
ALL_PACKAGES=$( $LSCMD | sort 2>/dev/null)
But I get nothing returned. It's just all blank. If I run the find command in a terminal, I get dozens of hits.
I figure it's the way how I'm... (3 Replies)
Can anyone offer any advice on how to modify the script below to work on a new system we have, that has no graphics capability? We admin the system through a serial RAS device. I've tried running the below script through the RAS and through an ssh -X session. It failed with something like "GTK... (3 Replies)
Discussion started by: yelirt5
3 Replies
LEARN ABOUT DEBIAN
plack::middleware::lighttpdscriptnamefix
Plack::Middleware::LighttpdScriptNameFix(3pm) User Contributed Perl Documentation Plack::Middleware::LighttpdScriptNameFix(3pm)NAME
Plack::Middleware::LighttpdScriptNameFix - fixes wrong SCRIPT_NAME and PATH_INFO that lighttpd sets
SYNOPSIS
# in your app.psgi
use Plack::Builder;
builder {
enable "LighttpdScriptNameFix";
$app;
};
# Or from the command line
plackup -s FCGI -e 'enable "LighttpdScriptNameFix"' /path/to/app.psgi
DESCRIPTION
This middleware fixes wrong "SCRIPT_NAME" and "PATH_INFO" set by lighttpd when you mount your app under the root path ("/"). If you use
lighttpd 1.4.23 or later you can instead enable "fix-root-scriptname" flag inside "fastcgi.server" instead of using this middleware.
CONFIGURATION
script_name
Even with "fix-root-scriptname", lighttpd still sets weird "SCRIPT_NAME" and "PATH_INFO" if you mount your application at "" or
something that ends with "/". Setting "script_name" option tells the middleware how to reconstruct the new correct "SCRIPT_NAME" and
"PATH_INFO".
If you mount the app under "/something/", you should set:
enable "LighttpdScriptNameFix", script_name => "/something";
and when a request for "/something/a/b?param=1" comes, "SCRIPT_NAME" becomes "/something" and "PATH_INFO" becomes "/a/b".
"script_name" option is set to empty by default, which means all the request path is set to "PATH_INFO" and it behaves like your
fastcgi application is mounted in the root path.
AUTHORS
Yury Zavarin
Tatsuhiko Miyagawa
SEE ALSO
Plack::Handler::FCGI <http://github.com/miyagawa/Plack/issues#issue/68> <https://redmine.lighttpd.net/issues/729>
perl v5.14.2 2011-02-27 Plack::Middleware::LighttpdScriptNameFix(3pm)