Hi
In the shell scripted I'm trying to write!
I would like to test the last character in a string. The string is a path/directory and I want to see if the last character is a '/'.
The string (path/directory) is inputted by a user. If the '/' character isn't present then I want to be able to... (11 Replies)
Hi guys, I hope you can help me with my problem.
I have a text file that contains lines like this:
78 ANGELO -809.05
79 ANGELO2 -5,000.06
I need to find all occurences of amounts that are negative and replace them with x's
78 ANGELO xxxxxxx
79... (4 Replies)
Hello All,
Plz help me with:
I have a csv file with data separated by ',' and optionally enclosed by "". I want to check each of these values to see if they exceed the specified string length, and if they do I want to cut just that value to the max length allowed and keep the csv format as it... (9 Replies)
Hi
lets say i have a variable
output="string"
how can you find the length of the string contained in this variable? i guess "wc" cannot be used. its only for files. (8 Replies)
I've never tested file length with shell before and I'm having problems. What I'm doing is testing $filename and $filename.bak to see if there is a difference. so I use 'diff' for that and send it to an output file 'dif.txt'. Now I wanna see if the length of 'dif.txt' is zero or not. that's where... (1 Reply)
Hello, I'm new to shell scripting and need a little help please.
I'm working on a script that asks the user to input a name that can be 1 to 12 alphanumeric characters and can have dots(.) dashes(-) and spaces. I want to test that the answer is valid and if not make the user try again. I have no... (4 Replies)
Helo,
I have character array of sixe 128
char filename
now I have one problem that when I enter filename as nothing I got value
as " " ",`\0` " .
when I find this string length ( " ",`\0`) as 1(one).
actually I want to make this length as zero.
so what should I do (10 Replies)
HI
In my script, i am reading the input from the user and want to find the length of the string.
The input may contain leading spaces. Right now, when leading spaces are there, they are not counted.
Kindly help me
My script is like below. I am using the ksh.
#!/usr/bin/ksh
echo... (2 Replies)
Hello, Unix-Forums!
Is there a command that can check how long a user-entered string is?
Please don't give me a code, just the name of the command (playing around yourself is much more fun than just pasting code)
edit: I'm sorry, first hit of the forum search gave me the answer. (1 Reply)
Discussion started by: intelinside
1 Replies
LEARN ABOUT DEBIAN
authcas
AuthCAS(3pm) User Contributed Perl Documentation AuthCAS(3pm)NAME
AuthCAS - Client library for CAS 2.0 authentication server
VERSION
Version 1.5
DESCRIPTION
AuthCAS aims at providing a Perl API to Yale's Central Authentication System (CAS). Only a basic Perl library is provided with CAS whereas
AuthCAS is a full object-oriented library. =head1 PREREQUISITES
This script requires IO::Socket::SSL and LWP::UserAgent
any
Network
SYNOPSIS
A simple example with a direct CAS authentication
use AuthCAS;
my $cas = new AuthCAS(casUrl => 'https://cas.myserver,
CAFile => '/etc/httpd/conf/ssl.crt/ca-bundle.crt',
);
my $login_url = $cas->getServerLoginURL('http://myserver/app.cgi');
## The user should be redirected to the $login_url
## When coming back from the CAS server a ticket is provided in the QUERY_STRING
## $ST should contain the receaved Service Ticket
my $user = $cas->validateST('http://myserver/app.cgi', $ST);
printf "User authenticated as %s
", $user;
In the following example a proxy is requesting a Proxy Ticket for the target application
$cas->proxyMode(pgtFile => '/tmp/pgt.txt',
pgtCallbackUrl => 'https://myserver/proxy.cgi?callback=1
);
## Same as before but the URL is the proxy URL
my $login_url = $cas->getServerLoginURL('http://myserver/proxy.cgi');
## Like in the previous example we should receave a $ST
my $user = $cas->validateST('http://myserver/proxy.cgi', $ST);
## Process errors
printf STDERR "Error: %s
", &AuthCAS::get_errors() unless (defined $user);
## Now we request a Proxy Ticket for the target application
my $PT = $cas->retrievePT('http://myserver/app.cgi');
## This piece of code is executed by the target application
## It received a Proxy Ticket from the proxy
my ($user, @proxies) = $cas->validatePT('http://myserver/app.cgi', $PT);
printf "User authenticated as %s via %s proxies
", $user, join(',',@proxies);
DESCRIPTION
CAS is Yale University's web authentication system, heavily inspired by Kerberos. Release 2.0 of CAS provides "proxied credential" feature
that allows authentication tickets to be carried by intermediate applications (Portals for instance), they are called proxy.
This AuthCAS Perl module provides required subroutines to validate and retrieve CAS tickets.
SEE ALSO
Yale Central Authentication Service (http://www.yale.edu/tp/auth/)
phpCAS (http://esup-phpcas.sourceforge.net/)
COPYRIGHT
Copyright (C) 2003 Comite Reseau des Universites (http://www.cru.fr). All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
AUTHORS
Olivier Salaun
perl v5.12.3 2011-05-17 AuthCAS(3pm)