08-19-2015
Thank you for helping me with this guys, will look into tac and use it more
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi everybody,
how do i open a txt file writen in unix on to a web page
so when i want to view the txt file that was generated from a shell program, that file is open on a web page
do i use the cat > filename.html command to do this, or is there another way
many thanks
:D (2 Replies)
Discussion started by: alexd
2 Replies
2. Shell Programming and Scripting
What does the below command means
$cat <<% >abc.txt (3 Replies)
Discussion started by: surjyap
3 Replies
3. UNIX for Dummies Questions & Answers
All -
how do i save the file after i used CAT command line to modify?
Thanks :confused: (2 Replies)
Discussion started by: March_2007
2 Replies
4. AIX
I would like to append some statement into 1 single file so that it can be concatenate together in 1 word. I have tried >> but it will seperate my 2 statement into 2 rows.
# cat abc.txt cde.txt > result.txt
where abc.txt is "abcde" and cde.txt is "12345"
the result should come out as... (3 Replies)
Discussion started by: kwliew999
3 Replies
5. UNIX for Dummies Questions & Answers
Hi
Can anybody tell the difference between Difference between cat , cat > , cat >> and touch command in UNIX?
Thanks (6 Replies)
Discussion started by: skyineyes
6 Replies
6. Shell Programming and Scripting
Hello,
So I sorted my file as I was supposed to:
sort -n -r -k 2 -k 1 file1 | uniq > file2
and when I wrote
> cat file2
in the command line, I got what I was expecting, but in the script itself
...
sort -n -r -k 2 -k 1 averages | uniq > temp
cat file2
It wrote a whole... (21 Replies)
Discussion started by: shira
21 Replies
7. UNIX for Advanced & Expert Users
I believe I used the cat command to append a file beside another file (instead of below it) but I did not document it any where and I can't remember exactly how I did it. Has anyone else done this? I have tried all the cat options individually with no luck. It may be a combination of options.
... (2 Replies)
Discussion started by: nickg
2 Replies
8. Shell Programming and Scripting
I want to concatenate 100 files to one file and append file name in each record to find out which file it came from
for a in $(<shal_group)
do
cat $a >> bigoutput.group
The above code put all files in one file but i want file name appended to each file
Record should be like this... (3 Replies)
Discussion started by: pinnacle
3 Replies
9. UNIX for Dummies Questions & Answers
Hi, I'm trying to output all text from the first paragraph in a file that contains a specific string through the last paragraph in that file that contains that string.
Previously, I was outputting just each paragraph with that search string with:
cat in_file | nawk '{RS=""; FS="\n";... (2 Replies)
Discussion started by: carpenn
2 Replies
10. AIX
Hi.
How can i write a command on AIX like the one i did at linux that find string in a file and show me that string, and return 3 lines before and 4 lines after that string.
my linux command is:
/bin/cat <filename> | tail -150 | grep -B2 -A8 "<string to look for>"
Example:
/bin/cat ... (10 Replies)
Discussion started by: yechi_r
10 Replies
LEARN ABOUT DEBIAN
authen::tacacsplus
TacacsPlus(3pm) User Contributed Perl Documentation TacacsPlus(3pm)
NAME
Authen::TacacsPlus - Perl extension for authentication using tacacs+ server
SYNOPSIS
use Authen::TacacsPlus;
$tac = new Authen::TacacsPlus(Host=>$server,
Key=>$key,
[Port=>'tacacs'],
[Timeout=>15]);
or
$tac = new Authen::TacacsPlus(
[ Host=>$server1, Key=>$key1, [Port=>'tacacs'], [Timeout=>15] ],
[ Host=>$server2, Key=>$key2, [Port=>'tacacs'], [Timeout=>15] ],
[ Host=>$server3, Key=>$key3, [Port=>'tacacs'], [Timeout=>15] ],
... );
$tac->authen($username,$passwords);
Authen::TacacsPlus::errmsg();
$tac->close();
DESCRIPTION
Authen::TacacsPlus allows you to authenticate using tacacs+ server.
$tac = new Authen::TacacsPlus(Host=>$server,
Key=>$key,
[Port=>'tacacs'],
[Timeout=>15]);
Opens new session with tacacs+ server on host $server, encrypted with key $key. Undefined object is returned if something wrong (check
errmsg()).
With a list of servers the order is relevant. It checks the availability of the Tacacs+ service using the order you defined.
Authen::TacacsPlus::errmsg();
Returns last error message.
$tac->authen($username,$password,$authen_type);
Tries an authentication with $username and $password. 1 is returned if authenticaton succeded and 0 if failed (check errmsg() for reason).
$authen_type is an optional argument that specifies what type of authentication to perform. Allowable options are:
Authen::TacacsPlus::TAC_PLUS_AUTHEN_TYPE_ASCII (default) Authen::TacacsPlus::TAC_PLUS_AUTHEN_TYPE_PAP
Authen::TacacsPlus::TAC_PLUS_AUTHEN_TYPE_CHAP
ASCII uses Tacacs+ version 0, and will authenticate against the "login" or "global" password on the Tacacs+ server. If no authen_type is
specified, it defaults to this type of authentication.
PAP uses Tacacs+ version 1, and will authenticate against the "pap" or "global" password on the Tacacs+ server.
CHAP uses Tacacs+ version 1, and will authenticate against the "chap" or "global" password on the Tacacs+ server. With CHAP, the password
if formed by the concatenation of
chap id + chap challenge + chap response
There is example code in test.pl
If you use a list of servers you can continue using $tac->authen if one of them goes down or become unreachable.
$tac->close();
Closes session with tacacs+ server.
EXAMPLE
use Authen::TacacsPlus;
$tac = new Authen::TacacsPlus(Host=>'foo.bar.ru',Key=>'9999');
unless ($tac){
print "Error: ",Authen::TacacsPlus::errmsg(),"
";
exit(1);
}
if ($tac->authen('john','johnpass')){
print "Granted
";
} else {
print "Denied: ",Authen::TacacsPlus::errmsg(),"
";
}
$tac->close();
AUTHOR
Mike Shoyher, msh@corbina.net, msh@apache.lexa.ru
Mike McCauley, mikem@open.com.au
BUGS
only authentication is supported
only one session may be active (you have to close one session before opening another one)
SEE ALSO
perl(1).
perl v5.14.2 2012-01-17 TacacsPlus(3pm)