Found that User-Agent and Host are switching spots when using different browsers!?!!?!?!?!?!! See below and let me know if there is a solution to these variations.
When IE does the request:
Chrome and Safari/Iphone/Android
Is there any way to be strict about always printing HOST first even if its after User-Agent? or vice-versa
Last edited by sectech; 03-03-2013 at 06:39 PM..
Reason: updated with more info.
Hi all,
I have an awk basic question.
file.text
Our Location:
Our home has light yellow siding,
and is a duplex on Main Street,
across from the High School,
and across the lane from the Health Center
If I run:
cat file.txt | awk '{print $2}' | grep... (7 Replies)
I have a script problem that I am not able to solve due my very limited understanding of unix/awk.
This is the contents of test.sh
awk '{print $1}'
From the prompt if I enter:
./test.sh Hello World
I would expect to see "Hello" but all I get is a blank line. Only then if I enter "Hello... (2 Replies)
I find an script with awk sitting around. I went through some online manuals, but I can't figure out exactly how it works. I can't post the whole program. Not allowed.
This is the line that is confusing me. I get when else is in the script
grep -v "^REM " $1| grep -v "JUNK;" | awk -F" "... (2 Replies)
Here's a basic awk program I am trying to run. It shows no error but shows no result either too. If someone can look up and tell me what's wrong I will be obliged.
Thanks. :)
Code Snippet.
#!/bin/bash
awk '{
for (i = 1 ; i <= 3 ; i++)
for ( j = 1 ; j <= 3 ; j++ ) {
... (2 Replies)
Hi,
Sorry if this is a newbie question. I guess you can use either awk or shell script for this sequence of operations, but knowing very little about either of them I'm not sure how I should try to write this.
The basic objective is to copy certain files that are scattered all over my... (10 Replies)
Hi,
I was trying to change the value of the 4th column (put '1' in the 4th column of each row). My awk command is:
awk -F, '{$3=1;}1' OFS= input.txt > ./test_out.txt
My input file is:
a 1 2 31
b 4 5 61
c 7 8 91
My output file (test_out.txt)is:
a 1 2 31
b 4 5 61
c 7 8 91
What... (4 Replies)
input:
Name|Operation
rec_10|1+2+2-
Output:
rec_10|1
Basically I am trying to calculate the result of "the path" in $3 where the operators follow the number and not preceding them like we normally do:
rec_10: +1+2-2=1
But I realise (I am sure there is a good reason for that) that awk... (7 Replies)
1. increase file space
first, double space a file:
awk '1;{print ""}'
I probably can understand it:print a blank line every time.But when I read triple space a file I am confused:
awk '1;{print "\n"}'
doesn't it meaning print a blank line every time too?
2. number each line of file, but... (6 Replies)
Discussion started by: hhdzhu
6 Replies
LEARN ABOUT MOJAVE
lwp::protocol::ldap
LWP::Protocol::ldap(3) User Contributed Perl Documentation LWP::Protocol::ldap(3)NAME
LWP::Protocol::ldap - Provide LDAP support for LWP::UserAgent
SYNOPSIS
use LWP::UserAgent;
$ua = LWP::UserAgent->new();
$res = $ua->get('ldap://ldap.example.com/' .
'o=University%20of%20Michigan,c=US??sub?(cn=Babs%20Jensen)',
Accept => 'text/json'):
DESCRIPTION
The LWP::Protocol::ldap module provides support for using ldap schemed URLs following RFC 4516 with LWP. This module is a plug-in to the
LWP protocol handling, so you don't use it directly.
In addition to being used with LDAP URIs, LWP::Protocol::ldap also acts as the base class for its sibling modules LWP::Protocol::ldaps and
LWP::Protocol::ldapi.
Features
HTTP methods supported
LWP::Protocol::ldap implements the HTTP GET and HEAD methods. They are mapped to the LDAP search operation,
Response format
Depending on the HTTP Accept header provided by the user agent, LWP::Protocol::ldap can answer the requests in one of the following
formats:
DSML
When the HTTP Accept header contains the "text/dsml" MIME type, the response is sent as DSMLv1.
JSON
When the HTTP Accept header contains the "text/json" MIME type, the response is sent as JSON. For this to work the JSON Perl module
needs to be installed.
LDIF
When the HTTP Accept header contains the "text/ldif" MIME type, the response is sent in LDIFv1 format.
HTML
In case no HTTP Accept header has been sent or none of the above MIME types can be detected, and the x-format extension has not been
provided either, the response is sent using HTML markup in a 2-column table format (roughly modeled on LDIF).
As an alternative to sending an HTTP Accept header, LWP::Protocol::ldap also accepts the "x-format" extension
Example:
ldap://ldap.example.com/o=University%20of%20Michigan,c=US??sub?(cn=Babs%20Jensen)?x-format=dsml
TLS support
For ldap and ldapi URIs, the module implements the "x-tls" extension that switches the LDAP connection to TLS using a call of the start_tls
method.
Example:
ldap://ldap.example.com/o=University%20of%20Michigan,c=US??sub?(cn=Babs%20Jensen)?x-tls=1
Note: In the above example, ideally giving "x-tls" should be sufficient, but unfortunately the parser in URI::ldap has a little flaw.
Authorization
Usually the connection is done anonymously, but if the HTTP Authorization header is provided with credentials for HTTP Basic authorization,
the credentials given in that header will be used to do a simple bind to the LDAP server.
SEE ALSO
LWP::Protocol::ldaps, LWP::Protocol::ldapi
COPYRIGHT
Copyright (c) 1998-2004 Graham Barr, 2012 Peter Marschall. All rights reserved. This program is free software; you can redistribute it
and/or modify it under the same terms as Perl itself.
perl v5.18.2 2013-12-23 LWP::Protocol::ldap(3)