09-12-2014
can you give me an example of how to do that? the way its setup in my environment is getting confusing
7 More Discussions You Might Find Interesting
1. UNIX Desktop Questions & Answers
Help,
I have been stuck on this issue for weeks.
I am a unix noobie.
I have a very long string and within that string I am trying to get proc file names
ie
PROCNAME1=SOME_FILENAME_UPDTBASE.SQL
There is a space on either side.
I can't for the life of me peel out the proc name:... (13 Replies)
Discussion started by: owenian
13 Replies
2. Shell Programming and Scripting
Although my sed skills are gradually developing, thanks in large part to this forum, I'm having a hard time dealing with pattern space and looping, which I suspect is what I'll need a better handle on to figure out my current issue, which is converting a multi line file like this:
... (4 Replies)
Discussion started by: tiggyboo
4 Replies
3. UNIX for Dummies Questions & Answers
Hi All,
i was reading up on a umask question on this forum and have a question on this.
the umask value on my home PC running on cygwin is 022. when i create a dir it defaults to permission 755, when i create a file it defaults to 644. Now it starts at 777 for dirs and 666 for files and... (1 Reply)
Discussion started by: Irishboy24
1 Replies
4. Shell Programming and Scripting
Hi,
First post here. I have something that may prove to be difficult.
I have the following files:
Example1.0.0.tar.gz
Example2.tar
Example3.zip
Example4.0.0.0.0.0.bzip2
I need to remove the file extensions and store as a variable so they look like this:
Example1.0.0
Example2... (3 Replies)
Discussion started by: Spadez
3 Replies
5. Shell Programming and Scripting
hello; Got a problem running monitoring scripts using sudo ssh.. Mgmt decided to take away root sudoers access.. so most of the scripts ran as:
sudo ssh $BOX ...
Now I need to run them as:
echo $my_pw | sudo -S -l my_user_id $BOX ...
I tried this but not working..
Any wisdom/tricks... (3 Replies)
Discussion started by: delphys
3 Replies
6. Red Hat
I want to start by saying I already resolved my issue but I want to understand why I am seeing what I am seeing.
I have a server with a RAID controller two 500GB drives and six 600GB drives. The two 500GB drives are mirrored and have the OS installed on them. The six 600GB they wanted set as... (4 Replies)
Discussion started by: scotbuff
4 Replies
7. OS X (Apple)
OSX 10.12.3, default bash terminal.
Consider this code and note it is calling 'sh' inside the code...
#!/bin/sh
echo '1\n2\n2\n3\n5' > /tmp/text
hexdump -C /tmp/text
/bin/echo '1\n2\n3\n4\n5' > /tmp/text
hexdump -C /tmp/text
Now view the interactive mode below, note the underlying shell is... (6 Replies)
Discussion started by: wisecracker
6 Replies
LEARN ABOUT DEBIAN
http::request::ascgi
HTTP::Request::AsCGI(3pm) User Contributed Perl Documentation HTTP::Request::AsCGI(3pm)
NAME
HTTP::Request::AsCGI - Set up a CGI environment from an HTTP::Request
VERSION
version 1.2
SYNOPSIS
use CGI;
use HTTP::Request;
use HTTP::Request::AsCGI;
my $request = HTTP::Request->new( GET => 'http://www.host.com/' );
my $stdout;
{
my $c = HTTP::Request::AsCGI->new($request)->setup;
my $q = CGI->new;
print $q->header,
$q->start_html('Hello World'),
$q->h1('Hello World'),
$q->end_html;
$stdout = $c->stdout;
# environment and descriptors will automatically be restored
# when $c is destructed.
}
while ( my $line = $stdout->getline ) {
print $line;
}
DESCRIPTION
Provides a convenient way of setting up an CGI environment from an HTTP::Request.
METHODS
new ( $request [, key => value ] )
Constructor. The first argument must be a instance of HTTP::Request, followed by optional pairs of environment key and value.
environment
Returns a hashref containing the environment that will be used in setup. Changing the hashref after setup has been called will have no
effect.
setup
Sets up the environment and descriptors.
restore
Restores the environment and descriptors. Can only be called after setup.
request
Returns the request given to constructor.
response
Returns a HTTP::Response. Can only be called after restore.
stdin
Accessor for handle that will be used for STDIN, must be a real seekable handle with an file descriptor. Defaults to a tempoary
IO::File instance.
stdout
Accessor for handle that will be used for STDOUT, must be a real seekable handle with an file descriptor. Defaults to a tempoary
IO::File instance.
stderr
Accessor for handle that will be used for STDERR, must be a real seekable handle with an file descriptor.
SEE ALSO
examples directory in this distribution.
WWW::Mechanize::CGI
Test::WWW::Mechanize::CGI
THANKS TO
Thomas L. Shinnick for his valuable win32 testing.
AUTHORS
Christian Hansen <ch@ngmedia.com> Hans Dieter Pearcey <hdp@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2010 by Christian Hansen <ch@ngmedia.com>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
perl v5.10.1 2010-01-12 HTTP::Request::AsCGI(3pm)