Sponsored Content
Top Forums Shell Programming and Scripting Expext script reading a crypted file Post 302086543 by Andrek on Thursday 24th of August 2006 07:41:25 PM
Old 08-24-2006
Expect script reading a crypted file

People, I really have two problems in one. Basicly "option 2" is the one I wish to persue but "option 1" will do for now....

Option 1
I have an expect script. I would like it to read (open ) a crypted file with out creating a decrypted file from the source (crypted file) then open and read the flat file.... any ideas....?

Option 2
I can do this from with in a standard UNIX script - no problem
ie (eval `crypt key </tmp/filename`)

Question.....
How do I (or can I) execute "expect" commands from with in the shell script (Without running a third external expect scrpit) and pass the shell varibales required to the expect code from with in the shell script?

Back ground.
The crypted file format is thus....
userid="myid"
password="mypass"
commnet="This is a comment"

Thanks
Andrek

Last edited by Andrek; 08-28-2006 at 12:56 AM.. Reason: typo in heading
 

8 More Discussions You Might Find Interesting

1. Programming

Reading a file into a C++ script

Hi, I'm trying to read a file in with and assigne the stream to a char * type. I've manged it using the cin.get returning type char, but am having run-time problems returning a char *. For example, char *pStream = "file.txt"; ifstream from(pStream); from.open(pStream); ... (1 Reply)
Discussion started by: Breen
1 Replies

2. UNIX for Dummies Questions & Answers

script to reading a file

hi, I have a file containing names, say n number of names, sample file robin smith dallas frey cook all these names are in a file name called names.txt and it is placed in a directory called /data/names all i want is to write a script, which will read from the file and gives the... (3 Replies)
Discussion started by: vasikaran
3 Replies

3. Shell Programming and Scripting

Reading file names from a file and executing the relative file from shell script

Hi How can i dynamically read files names from a list file and execute them from a single shell script. Please help its urgent Thanks in Advance (4 Replies)
Discussion started by: anushilrai
4 Replies

4. Shell Programming and Scripting

Script for reading .csv file

Can someone please help me to write script for following scenario : 1> script should read a input .csv file of format : EmpName, PF, Leave, Basic ,HRA 2> another config file ( may be again a .csv file ) has format EmpName and EmpID 3> script should read another config file for each EmpName in... (3 Replies)
Discussion started by: creativeworld
3 Replies

5. UNIX for Dummies Questions & Answers

UNIX script for reading a file and creating another file

Hi, I am a beginner in scripting...I have to do a script where I have to read a file which has list of job names, line by line and for every line execute a dsjob command to find the log details of the job and extract only the start time of the job, if it is greater than jan 01 2008 and create... (1 Reply)
Discussion started by: Vijay81
1 Replies

6. Programming

Expext Script excution problem..

Hey Guys , iam trying to match to string in TCL scripts but it not working . Its only working true condition to print yes.. When condtion fail then even it prints YES Any suggestion this ?? if {} { puts"yes" ... (3 Replies)
Discussion started by: hackerdilli
3 Replies

7. UNIX for Dummies Questions & Answers

Reading XML file and print the values in the text file using Linux shell script

hi guys, i want help... Reding XML file and print the values into the text file using linux shell script file as per below xml file <sequence> <Filename>aldorzum.doc</Filename> <DivisionCode>US</DivisionCode> <ContentType>Template</ContentType> <ProductCode>VIMZIM</ProductCode> </sequence>... (1 Reply)
Discussion started by: sravanreddy
1 Replies

8. Shell Programming and Scripting

ksh Script, Reading A File, Grepping A File Contents In Another File

So I'm stumped. First... APOLOGIES... my work is offline in an office that has zero internet connectivity, as required by our client. If need be, I could print out my script attempts and retype them here. But on the off chance... here goes. I have a text file (file_source) of terms, each line... (3 Replies)
Discussion started by: Brusimm
3 Replies
CGI
::Application::Plugin::Authentication::Driver::FilterUseryContributed Perl CGI::Application::Plugin::Authentication::Driver::Filter::crypt(3pm) NAME
CGI::Application::Plugin::Authentication::Driver::Filter::crypt - crypt Filter VERSION
This document describes CGI::Application::Plugin::Authentication::Driver::Filter::crypt version 0.20 METHODS
filter ( undef, $string [, salt ] ) This will generate a crypted string. The first parameter is always ignored, since there is only one way to use the crypt function. You can pass in an extra parameter to act as the salt. my $filtered = $class->filter(undef, 'foobar'); # mQvbWI43eDCAk -or- my $filtered = $class->filter(undef, 'foobar', 'AA'); # AAZk9Aj5/Ue0E check ( undef, $string, $crypted ) This will crypt the string, and compare it against the provided crypted string. The first parameter is always ignored, since there is only one way to use the crypt function. if ($class->check(undef, 'foobar', 'mQvbWI43eDCAk')) { # they match } SEE ALSO
CGI::Application::Plugin::Authentication::Driver, perl(1) AUTHOR
Cees Hek <ceeshek@gmail.com> LICENCE AND COPYRIGHT
Copyright (c) 2005, SiteSuite. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.12.3 2011-05-16CGI::Application::Plugin::Authentication::Driver::Filter::crypt(3pm)
All times are GMT -4. The time now is 05:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy