08-15-2012
Yes, it works just like that. You don't need to store // in the string, either.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi all,
I carelessly remove the contents of /var/sadm/pkg. I do not have any backup of the folder. What can I do ? Thanks a lot. :eek: (11 Replies)
Discussion started by: stancwong
11 Replies
2. Shell Programming and Scripting
Hi,
CRT=1
LPORT=
while
do
echo "Please type the Port and F when finish : (current value: $LPORT)"
readDefault -e LPORT
if
then
"LISTEN_PORT"$CRT=$LPORT
$CRT++
fi
done
for i in "$CRT"; do
echo... (3 Replies)
Discussion started by: potro
3 Replies
3. Shell Programming and Scripting
Hello,
I have a file which has user information. Each user has 2 variables with the same name like
Email: testuser1
Email: testuser1@test.com
Email: testuser2
Email: testuser2@test.com
My intention is to delete the ones without the '@' symbol. When I run this statement awk '/^Email:/&&!/@/'... (6 Replies)
Discussion started by: rmsagar
6 Replies
4. Shell Programming and Scripting
Hello everyone....
I am trying to dinamically create variable names and do resolution of this vars contents.
After that is done I want to use (via a function call) the var and its contents by referring to it via the variable name.
I am having a hard time achieving this .... can you help ?
... (5 Replies)
Discussion started by: gio001
5 Replies
5. Solaris
Hello, I recently found that my /var/sadm/install/contents, ~/admin/default, /var/spool/patch and /var/spool/pkg files were empty.
This broke the pkginfo, pkgchk and other package related tools.
The pkgmap no longer points to where the applications have been installed.
I have replaced the... (0 Replies)
Discussion started by: ronin42
0 Replies
6. Shell Programming and Scripting
Hi All,
I have a sftp session log where I am transferring multi files by issuing "mput abc*.dat". The contents of the logfile is below -
#################################################
Connecting to 10.75.112.194...
Changing to: /home/dasd9x/testing1
sftp> mput abc*.dat
Uploading... (7 Replies)
Discussion started by: k_bijitesh
7 Replies
7. Shell Programming and Scripting
Hello, All. This is my first post here, and I expect that the answer is simple, but I can't find it. Might be the way I'm searching. I'm fairly new to Unix/Linux, and I'm writing a Korn Shell Script. I am trying to provide a value that is already in a variable to awk so that awk can pull out the... (3 Replies)
Discussion started by: compguy74
3 Replies
8. Shell Programming and Scripting
Hi ,
I am trying to extract contents of a file between specified time stamp. but it does not seem to work. i am trying to extract output of /var/adm/messages between 15:00:00 to 15:23:59 .
i have tried two regex the first one seems to kind of work. it displays some output. the second one is... (13 Replies)
Discussion started by: chidori
13 Replies
9. Shell Programming and Scripting
Hi one of the output of the command is as below
# sed -n "/CCM-ResourceHealthCheck:/,/---------/{/CCM-ResourceHealthCheck:/d;/---------/d;p;}" Automation.OutputZ$zoneCounter | sed 's/$/<br>/'
Resource List : <br>
*************************** 1. row ***************************<br>
... (2 Replies)
Discussion started by: vivek d r
2 Replies
10. Solaris
Hi,
Somebody/somebody removed all contents /vat/sadm on Solaris 10 Sparc box.
As of now server is up and running. There is no backup for this server.
If we copy contents from another equivalent server, can it work ?
We don't know if it will be fixed by booting form DVD also.
Any suggestions? (4 Replies)
Discussion started by: solaris_1977
4 Replies
LEARN ABOUT DEBIAN
crypt::simple
Simple(3pm) User Contributed Perl Documentation Simple(3pm)
NAME
Crypt::Simple - encrypt stuff simply
SYNOPSIS
use Crypt::Simple;
my $data = encrypt(@stuff);
my @same_stuff = decrypt($data);
DESCRIPTION
Maybe you have a web application and you need to store some session data at the client side (in a cookie or hidden form fields) but you
don't want the user to be able to mess with the data. Maybe you want to save secret information to a text file. Maybe you have better
ideas of what to do with encrypted stuff!
This little module will convert all your data into nice base64 text that you can save in a text file, send in an email, store in a cookie
or web page, or bounce around the Net. The data you encrypt can be as simple or as complicated as you like.
KEY
If you don't pass any options when using "Crypt::Simple" we will generate a key for you based on the name of your module that uses this
one. In many cases this works fine, but you may want more control over the key. Here's how:
use Crypt::Simple passphrase => 'pass phrase';
The MD5 hash of the text string "pass phrase" is used as the key.
use Crypt::Simple prompt => 'Please type the magic words';
The user is prompted to enter a passphrase, and the MD5 hash of the entered text is used as the key.
use Crypt::Simple passfile => '/home/marty/secret';
The contents of the file /home/marty/secret are used as the pass phrase: the MD5 hash of the file is used as the key.
use Crypt::Simple file => '/home/marty/noise';
The contents of the file /home/marty/noise are directly used as the key.
INTERNALS
"Crypt::Simple" is really just a wrapper round a few other useful Perl modules: you may want to read the documentation for these modules
too.
We use "FreezeThaw" to squish all your data into a concise textual representation. We use "Compress::Zlib" to compress this string, and
then use "Crypt::Blowfish" in a home-brew CBC mode to perform the encryption. Somewhere in this process we also add a MD5 digest (using
"Digest::MD5"). Then we throw the whole thing through "MIME::Base64" to produce a nice bit of text for you to play with.
Decryption, obviously, is the reverse of this process.
WARNING
Governments throughout the world do not like encryption because it makes it difficult for them to look at all your stuff. Each country has
a different policy designed to stop you using encryption: some governments are honest enough to make it illegal; some think it is a
dangerous weapon; some insist that you are free to encrypt, but only evil people would want to; some make confusing and contradictory laws
because they try to do all of the above.
Although this modules itself does not include any encryption code, it does use another module that contains encryption code, and this
documentation mentions encryption. Downloading, using, or reading this modules could be illegal where you live.
AUTHOR
Marty Pauley <marty@kasei.com>
COPYRIGHT
Copyright (C) 2001 Kasei Limited
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License; either version 2 of the License,
or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE.
perl v5.10.0 2002-09-23 Simple(3pm)