05-12-2013
thank you so much. You have really helped me a lot. I would be grateful , if it is possible for you to explain shortly how it works.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Everyone,
Please help me with this. I have gone through many posts here but couldn't find what I wanted.
I have a file with 79000+ lines and I want to delete lines in a pattern.
I want to delete every 141st line in the file, starting from line 2000 till 50000.
Please help guys.
... (8 Replies)
Discussion started by: max29583
8 Replies
2. UNIX for Dummies Questions & Answers
I have below file say temp1
BSCAJM1:HWJA10C
BSCAJM1:
BSCALW1:
BSCALW1:GVND01B
BSCALW1:
BSCALW1:
BSCBKNR:IJNMKTA
BSCBKNR:
BSCJOD1:
BSCJOD1:JOD121B
i want to delete all the lines ending with : and have below output
BSCAJM1:HWJA10C
BSCALW1:GVND01B
BSCBKNR:IJNMKTA... (8 Replies)
Discussion started by: lalchand
8 Replies
3. Shell Programming and Scripting
Hi All ,
Given a file , I need to delete , modify and insert lines matching certain patterns in that file using shell scripting.
e.g. If a file FILE1 has following content :
CUST.ABC.DEF = CUST.ABC.DEF * CUST.ABC.DEF
PRINTF(CUST.ABC.DEF)
CUST.ABC.DEF = mid(CUST.ABC.DEF,10.34)... (5 Replies)
Discussion started by: swapnil.nawale
5 Replies
4. Shell Programming and Scripting
Say I used grep and awk for taking text out of a text file...
I now /have 3 lines of text that I want to combine to make 1 line.
What command could I use to do this?
...
display line 1 twice then
sed s/$line1/$line2/ ????... display line 2 twice then
sed s/$line2/$line3/ (2 Replies)
Discussion started by: puttster
2 Replies
5. Shell Programming and Scripting
Hi i need an help. I have two files list1 and list2, both contains the server names i want to delete the servers in list2 which were also found in list1.
for an eg
list2 list1
oradg1 oradg4
oradg2 oradg2
oradg3 ... (5 Replies)
Discussion started by: sudharson
5 Replies
6. Shell Programming and Scripting
Hi,
I have a file with more than 2,000 rows like this:
05/26/2011,1200,1500
I would like to create a awk shell script that calculate the price average of the second and third field each 5,10 and 20 rows or ask me for the values, starting at first row.
Finally compare the average value... (1 Reply)
Discussion started by: csierra
1 Replies
7. Shell Programming and Scripting
Hello,
I am trying to create a awk script to calculate the simple moving average of two fields but I got only the result of the first field.
Could you please help me to fix this awk shell script
awk -F, -v points=5 '
{
a = $2;
b = $3;
if(NR>=points) {
total_a = 0;
total_b... (1 Reply)
Discussion started by: csierra
1 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I have a space delimited text file that looks like the following:
Aa 100 200
Bb 300 100
Cc X 500
Dd 600 X
Basically, I want to take the average of columns 2 and 3 and print it in column 4. However if there is an X in either column 2 or 3, I want to print the non-X value. Therefore... (11 Replies)
Discussion started by: evelibertine
11 Replies
9. How to Post in the The UNIX and Linux Forums
I have date file like below..
1995 1 2 10 29 38.6706 -6.53823 41.9201
1995 1 2 10 29 -49.2477 -4.59733 17.2704
1995 1 2 10 29 -49.2369 -4.48045 8.61348
1995 1 3 8 48 -42.2643 ... (3 Replies)
Discussion started by: athithi
3 Replies
10. Shell Programming and Scripting
Hello all,
I have a large csv file where there are four types of rows I need to merge into one row per person, where there is a column for each possible code / type of row, even if that code/row isn't there for that person.
In the csv, a person may be listed from one to four times... (9 Replies)
Discussion started by: RalphNY
9 Replies
LEARN ABOUT DEBIAN
lwp::authen::negotiate
LWP::Authen::Negotiate(3pm) User Contributed Perl Documentation LWP::Authen::Negotiate(3pm)
NAME
LWP::Authen::Negotiate - GSSAPI based Authentication Plugin for LWP
SYNOPSIS
#! /usr/bin/perl -w
use strict;
require LWP::UserAgent;
# uncomment if you want see what is going wrong messages
#
#use LWP::Debug qw(+);
my $ua = LWP::UserAgent->new;
my $response = $ua->get('http://testwurst.grolmsnet.lan:8090/geheim/');
if ($response->is_success) {
print $response->content; # or whatever
}
else {
die $response->status_line;
}
just install LWP::Authen::Negotiate, LWP uses it as authentication plugin. Use your LWP::UserAgent Scripts as usual. Authentication is
done transparent based on your GSSAPI installation (MIT Kerberos or Heimdal)
WWW-Negotiate Webservers are IIS or Apache with mod_auth_kerb for example.
DESCRIPTION
To see what ist going on add
use LWP::Debug qw(+);
to yor LWP using Scripts.
(e.g. too see what is going wrong with GSSAPI...)
DEBUGGING
To see what ist going on (and going wrong) add
use LWP::Debug qw(+);
to yor LWP using Scripts.
(e.g. too see what is going wrong with GSSAPI...)
the output will look like this:
LWP::UserAgent::new: ()
LWP::UserAgent::request: ()
LWP::UserAgent::send_request: GET http://testwurst.grolmsnet.lan:8090/geheim/
LWP::UserAgent::_need_proxy: Not proxied
LWP::Protocol::http::request: ()
LWP::Protocol::collect: read 478 bytes
LWP::UserAgent::request: Simple response: Unauthorized
LWP::Authen::Negotiate::authenticate: authenticate() called
LWP::Authen::Negotiate::authenticate: target hostname testwurst.grolmsnet.lan
LWP::Authen::Negotiate::authenticate: GSSAPI servicename HTTP/moerbsen.grolmsnet.lan@GROLMSNET.LAN
LWP::Authen::Negotiate::authenticate: Miscellaneous failure (see text)
LWP::Authen::Negotiate::authenticate: open(/tmp/krb5cc_1000): file not found
In this case the credentials cache was empty. Run kinit first ;-)
ENVIRONMENT
LWP_AUTHEN_NEGOTIATE_DELEGATE
Define to enable ticket forwarding to webserver.
SEE ALSO
http://www.kerberosprotocols.org/index.php/Draft-brezak-spnego-http-03.txt
Description of WWW-Negotiate protol
http://modauthkerb.sourceforge.net/
the Kerberos and SPNEGO Authentication module for Apache mod_auth_kerb
http://perlgssapi.sourceforge.net/
Module Homepage
http://www.kerberosprotocols.org/index.php/Web
Sofware and APIs related to WWW-Negotiate
http://www.grolmsnet.de/kerbtut/
describes how to let mod_auth_kerb play together with Internet Explorer and Windows2003 Server
BUGS
As default Kerberos 5 is selected as GSSAPI mechanism. a later veriosn will make that configureable.
AUTHOR
Achim Grolms, <achim@grolmsnet.de>
http://perlgssapi.sourceforge.net/
Thanks to
Leif Johansson
who has conributed a lot of code from his implementation of the module and send a lot of input, ideas and feedback
Harald Joerg
helped with Kerberos knowledge and does testing on cygwin against IIS and mod_auth_kerb
Christopher Odenbach
does a lot of testing on Linux and Solaris
Dax Kelson
does a lot of testing on Linux
Karsten Kuenne
helped with advice
COPYRIGHT AND LICENSE
Copyright (C) 2006 by Achim Grolms <perl@grolmsnet.de>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.4 or,
at your option, any later version of Perl 5 you may have available.
perl v5.10.1 2009-10-29 LWP::Authen::Negotiate(3pm)