Search Results

Search: Posts Made By: sniper57
Forum: Web Development 09-30-2015
4,341
Posted By sniper57
Apache 2.4 web server - string manipulation
Hi,

I have configured an Apache 2.4 web server for Kerberos authentication. I need to pass the user in an HTTP header to the back-end server. This can be achieved by:-
# Set header to blank...
Forum: Web Development 02-09-2015
1,478
Posted By sniper57
Apache authz
Hi All,

I have configured my Apache HTTP Server to authenticate users using SSL certificates and to forward the CN of the user from the certificate in the HTTP header to the backend server.
...
Forum: Web Development 02-06-2015
1,343
Posted By sniper57
Thanks Neo. That resolved my problems! ...
Thanks Neo. That resolved my problems!

---------- Post updated at 01:31 PM ---------- Previous update was at 01:25 PM ----------

One small issue which is not necessarily a problem, why do I get...
Forum: Web Development 02-06-2015
1,343
Posted By sniper57
Apache redirects
Hi,

I am trying to redirect a site to a new site but have a few issues:-

For example I want to redirect:
http://dev.example.com/page?Id=12345
to ...
1,528
Posted By sniper57
Shell script to read words into an array
Hello,

I have output like below:

-----------------------------------------------------------------------------
Group 'group1' on system 'system01' is running....
1,730
Posted By sniper57
Perfect, thanks!
Perfect, thanks!
1,730
Posted By sniper57
Concatenating awk fields with variable
Hi,

I am trying to do this:-

FILE=application.log
PID=12345

FILE=`echo $FILE | awk -F "." '{print $1 "$PID" $2}'`

echo $FILE
application$PIDlog

I need the output to be...
4,665
Posted By sniper57
Genius - thanks very much. Exactly what's needed.
Genius - thanks very much. Exactly what's needed.
4,665
Posted By sniper57
OK I have an input file (e.g. imput.txt) which...
OK I have an input file (e.g. imput.txt) which looks something like :-

Server 1 | Group 1 | 34586 | Alive
Server 2 | Group 1 | 92876 | Alive
Server 1 | Group 2 | 87321 |...
4,665
Posted By sniper57
Using AWK in IF evaluation in KSH
Hi -

I have an expression that evaluates to "Alive" or some other condition. e.g. if I run :-

awk -F \| '{gsub(/[[:space:]]*/,"",$4); print $4 }'

then the output is "Alive".

I want to be...
2,026
Posted By sniper57
Cheers thanks all for the help.
Cheers thanks all for the help.
2,026
Posted By sniper57
Thanks for the replies. Both answers work...
Thanks for the replies. Both answers work perfectly.

---------- Post updated at 03:02 PM ---------- Previous update was at 12:18 PM ----------

This is suddenly got more complicated!!

I need...
2,026
Posted By sniper57
How to read file and only output certain content
Hi -

I have a file containing data like :-
cn=tommy,cn=users,c=uk
passwordexpirydate=20100530130623z

cn=jane,cn=users,c=uk
passwordexpirydate=20100423140734z

cn=michael,cn=users,c=uk...
3,451
Posted By sniper57
awk or sed to split dn
Hello -

I have an input file with user dn's. e.g.

cn=peter,cn=users,dc=com,dc=uk
cn=simon,cn=users,dc=com,dc=uk
cn=john,cn=users,dc=com,dc=uk
cn=fred,cn=users,dc=com,dc=uk

My script needs...
2,439
Posted By sniper57
Great answers ... thanks for the help :)
Great answers ... thanks for the help :)
3,167
Posted By sniper57
Hi - This is the input file :- # dn,...
Hi -
This is the input file :-
# dn, firstname, surname, password
cn=bob,cn=user,dc=com, bob, jones, Password123
cn=john,cn=user,dc=com, john, smith, Password456

and the output file should...
2,439
Posted By sniper57
sed or awk to order a file
Hi -

I have a file with lots of lines in that I need to order based on the number of commas!

e.g the file looks something like :-
cn=john,cn=users,cn=uk,dc=dot,dc=com
cn=john,cn=users,dc=com...
3,167
Posted By sniper57
It should look like :- dn:...
It should look like :-

dn: cn=bob,cn=user,dc=com
objectclass: inetOrgPerson
objectclass: ePerson
objectclass: organizationalPerson
objectclass: person
objectclass: top
cn: bob
sn: bob...
3,167
Posted By sniper57
Write a new file from 2 files as input to the script
Hi-
I am hoping someone can give me some pointers to get me started. I have a file which contains some dn's .e.g file 1
cn=bob,cn=user,dc=com
cn=kev,cn=user,dc=com
cn=john,cn=user,dc=com

I...
29,686
Posted By sniper57
Thanks for the suggestion ... I have tried :- ...
Thanks for the suggestion ... I have tried :-

while read line ; do
read line1
set -A arr $line1
done < /tmp/test.txt

and also

i=0
exec < /tmp/test.txt
while read line ; do
...
29,686
Posted By sniper57
KSH: Reading a file line by line into multiple arrays
Hi -
I have a file that contains data in this format:-

#comment
value1 value2 value3
#comment
value4 value5 value6 value7
#comment
value8 value9

I need to read value1, value2 and value3...
1,640
Posted By sniper57
Cheers. I suspect you are right :)
Cheers. I suspect you are right :)
4,548
Posted By sniper57
Thanks Devaraj ... works nicely
Thanks Devaraj ... works nicely
4,548
Posted By sniper57
Thanks for the help. I have gone with from all...
Thanks for the help.
I have gone with from all suggestions ....

sed -n '/cn=.*dc=uk/p' filea.txt | awk -F" : " '{print $4}' > new_filea.txt
4,548
Posted By sniper57
Hi Devaraj- Thanks for the suggestion .....
Hi Devaraj-

Thanks for the suggestion .. that actually prints everything that I dont want :)

awk -F "cn" '{print $1}' filename

Any ideas as to what the inverse of this command is please?
Showing results 1 to 25 of 30

 
All times are GMT -4. The time now is 08:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy