07-01-2008
Masking Content of a String
Hello,
I need to know that whether a content of a string can be hidden or masked inside a shell script.
My Sample Code is given below
<Code>
#!/usr/bin/ksh
Userid=test
DB=temp
Passwd=`java Decryption test`
# The Above command will get the encryped password for "test" user id and store it in Passwd Variable.
# I donot want anybody to see the Value of Passwd even if it is echoed on the screen. (ie) Either by masking or hiding.
# I want to connect to a DB by passing the Passwd Vairable
CONN=`sqlplus -s $Userid/$Passwd@DB <<EOF
whenever sqlerror exit failure
select * from dual;
EOF`
echo "CONN : "$CONN
</Code>
Can anybody help me on this.
Thanks
Rahul
Last edited by maxmave; 07-01-2008 at 05:08 PM..
Reason: Subject
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello all:
I'm new in Unix and here and I'am spanish so my english isn't so good to explain my doubt. Here it is.
Very urgent:
I need to compare the value of a variable with a string.
Example is this.
Imagine that the variable x1 contains the path and a file text and I need to compare... (2 Replies)
Discussion started by: robdai
2 Replies
2. Shell Programming and Scripting
Hi,
I'm a newbi in shell script. Here what I want to do:
FileA:
bor bor bor
xxxx
bib bib bi
FileB:
something something
something
I want to replace string "xxxx" in FileA with contents of FileB.
i tried with sed:
fileb=`cat FileB`
reg=xxxx
file=FileA (4 Replies)
Discussion started by: afatguy
4 Replies
3. Shell Programming and Scripting
Hi,
I've a shell script e.g.
#!/bin/bash
echo "Enter the next hop id"
read nhid
echo "enter the IP address"
read IP
echo "enter the interface name"
read name
echo "enter the enable/disable state"
read state
exit 0
now from this script i want to search strings in another (.cam)
... (6 Replies)
Discussion started by: vic_mnnit
6 Replies
4. UNIX for Dummies Questions & Answers
Hi All,
I have a string in the following format:
"kf skjgsdjgngnsd sdgsd
ksjgbksjgb kjsbgsjdgb
dfhdh
sjgsjg j jsbekgjsbdkgj".
In this format i want to extract the contents which is in between the two empty lines:... (6 Replies)
Discussion started by: bala041
6 Replies
5. Shell Programming and Scripting
How can I search for a string in a filename? For example, I want to know if a filename (not the file contents) contains the string "test". (3 Replies)
Discussion started by: daflore
3 Replies
6. Shell Programming and Scripting
Hi,
How to add string inside the file. In this case adding 63 in the beginning of each line. Thnks.
e.g. what is inside the file
Mobile Number Portability
9051151234
9051261345
9051393245
9051412345
9051507654
should like this as output:
Mobile Number Portability (7 Replies)
Discussion started by: shtobias
7 Replies
7. Shell Programming and Scripting
Hi experts,
As i am a novice unix player...so need help for the below query...banged my head from quite a while...:confused:
i have a set of html files, in which i need to search for string "Page"(case sensitive) and then replace the same with some numeric code ,say, "XXX1234".
Here in... (2 Replies)
Discussion started by: rahulfhp
2 Replies
8. Shell Programming and Scripting
hi
I have template file my.tpl:
bla-bla-bla
<link href="style.css" type="text/css">
bla-bla-bla
and style.css :
body{margin: 0px;}
I want to get in result one file:
bla-bla-bla
<script>body{margin: 0px;}</script>
bla-bla-bla
I tryed to used SED:
sed '/<link .*href=\"(*)*\"... (6 Replies)
Discussion started by: dim_nsk
6 Replies
9. Shell Programming and Scripting
hello,
i have a variable which should have following content :
var="value1"
or
var="value2"
or
var="value2:*" # example: value2:22
how can i check :
- if the content is ok (value1 / value2* )
- the two options of "value2"
when content is example "value2:22" , i want to split... (3 Replies)
Discussion started by: bora99
3 Replies
10. Shell Programming and Scripting
Hi,
echo "mypassword" | crypt "tom" But this is giving me some unreadable strange looking characters / symbols never seen before which I cant even copy and save in a file.
SunOS mymac 5.10 Generic_150400-26 sun4v sparc sun4v Can you help me with encrypting the password "mypassword" in... (15 Replies)
Discussion started by: mohtashims
15 Replies
LEARN ABOUT DEBIAN
anydata::format::mp3
AnyData::Format::Mp3(3pm) User Contributed Perl Documentation AnyData::Format::Mp3(3pm)
NAME
AnyData::Format::Mp3 - tied hash and DBI access to Mp3 files
SYNOPSIS
use AnyData;
my $playlist = adTie( 'Passwd', ['c:/My Music/'] );
while (my $song = each %$playlist){
print $song->{artist} if $song->{genre} eq 'Reggae'
}
OR
use DBI
my $dbh = DBI->connect('dbi:AnyData:');
$dbh->func('playlist','Mp3,['c:/My Music'],'ad_catalog');
my $playlist = $dbh->selectall_arrayref( qq{
SELECT artist, title FROM playlist WHERE genre = 'Reggae'
});
# ... other DBI/SQL operations
DESCRIPTION
This module provides a tied hash interface and a DBI/SQL interface to MP files. It creates an in-memory database or hash from the Mp3
files themselves without actually creating a separate database file. This means that the database is automatically updated just by moving
files in or out of the directories.
Many mp3 (mpeg three) music files contain a header describing the song name, artist, and other information about the music.
Simply choose 'Mp3' as the format and give a reference to an array of directories containing mp3 files. Each file in those directories
will become a record containing the fields:
song
artist
album
year
genre
filename
filesize
This module is a submodule of the AnyData.pm and DBD::AnyData.pm modules. Refer to their documentation for further details.
AUTHOR & COPYRIGHT
copyright 2000, Jeff Zucker <jeff@vpservices.com> all rights reserved
perl v5.10.1 2004-08-17 AnyData::Format::Mp3(3pm)