12-14-2010
Ignoring file name case and decrypting it.
Dear Friends,
I want to decrypt 2 different file types in a folder (ZIP files and GPG files).
Each file type need different decryption syntex.
Hence, the script should identify file type and should act accordingly ignoring file name case i.e. upper or lower case.
Also, the extention can be in caps because of which the script should not be case sensitive.
E.g.
Following files I have in a folder which are to be decrypted
1) abc.zip (all lower case)
2) ABC.ZIP (all upper case)
3) aBc.zIp (combination case)
4) abc.gpg (gpg encription)
5) abc.GPG (gpg encription, combination case)
Manually we decript zip files by following syntex
unzip filename
Manually we decript zip files by following syntex
gpg filename
Please guide me to do the same
Thank you all in advance
Anushree
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Accidentally, I encrypted a file while saving it in vi editor.
While saving I used :X and when asked for encryption key, I simply pressed ENTER key without any input.
I searched the forum, but unfortunately didn't get the proper solution. In one of the threads it asked to visit a particular... (1 Reply)
Discussion started by: rkkiran
1 Replies
2. Shell Programming and Scripting
Accidentally, I encrypted a file while saving it in vi editor.
While saving I used :X and when asked for encryption key, I simply pressed ENTER key without any input.
Now, I want to decrypt the file.
I searched the forum, but unfortunately didn't get the proper solution. In one of the... (1 Reply)
Discussion started by: rkkiran
1 Replies
3. Shell Programming and Scripting
how do you go about doing this i have a shell script here below but i am not to sure on the process of decrytpting the file.
#!/bin/csh
#
#
set am = abcdefghijklm'
set am = ABCDEFGHIJKLM'
set nz = nopqrstuvwxyz'
set NZ = NOPQRSTUVWXYZ'
cat $argv | tr $am $AM | tr $NZ $nz | tr $nz $am... (1 Reply)
Discussion started by: master_6ez
1 Replies
4. Shell Programming and Scripting
I am getting a parameter from a user and I need to use it to search and return the matching line numbers in a file. I am using this code:
recordNumber="$(sed -n '/'"$entry"'/{
=
d
}' unixdb1.txt)"
where $entry is the passed search parameter. The problem is I need to ignore the case. ... (3 Replies)
Discussion started by: snag49ers
3 Replies
5. Shell Programming and Scripting
Hi
I want to make string substitution ignoring case for search but respecting case for subtitute. Ex changing all occurences of "original" in a file to "substitute":
original becomes substitute
Origninal becomes Substitute
ORIGINAL becomes SUBSTITUTE
I know this a little special but it's not... (1 Reply)
Discussion started by: kmchen
1 Replies
6. Shell Programming and Scripting
in if clause , how 1 can ignore case (i.e. small or capital) ny suggestions? (2 Replies)
Discussion started by: Gl@)!aTor
2 Replies
7. Shell Programming and Scripting
Hello,
I am a newbie in Shell scripting. At the moment, I have a program written in C++ which gives an output file in text format. I would like to write a shell program which can take that output file and encrypt it and later if needed I want to decrypt it.
Could someone please help or... (3 Replies)
Discussion started by: Tanin
3 Replies
8. Programming
I know that simply encrypting and decrypting passwords in a script is as bad as storing them in plain text, but I've been searching for an answer to this for a few days now, and haven't found an answer that fits the problem I'm having.
Here's the scenario. I'll give more details than I think may... (3 Replies)
Discussion started by: mdrisser
3 Replies
9. UNIX for Advanced & Expert Users
Hello All,
Is there a way to determine how many public keys are embedded or used to encrypt in a GPG file with out decrypting the actual encrypted file. I know i can see the keys & email id's used when we decrypt it, but curious to find a command if any to know with out decrypting the actual file... (2 Replies)
Discussion started by: Ariean
2 Replies
10. Shell Programming and Scripting
Oracle Linux 6.5
$ cat someStrings.txt
GRANT select on MANHPRD.S_PROD_INT TO OR_PHIL;
GRANT select on MANHPRD.S_PROD_INT TO OR_PHIL;
GRANT select on SCOTT.emp to JOHN;
grant select on scott.emp to john;
grant select on scott.dept to hr;If you ignore the case and the empty space between the... (6 Replies)
Discussion started by: kraljic
6 Replies
GPG-ZIP(1) GNU Privacy Guard GPG-ZIP(1)
NAME
gpg-zip - Encrypt or sign files into an archive
SYNOPSIS
gpg-zip [options] filename1 [ filename2, ... ] directory1 [ directory2, ... ]
DESCRIPTION
gpg-zip encrypts or signs files into an archive. It is an gpg-ized tar using the same format as used by PGP's PGP Zip.
OPTIONS
gpg-zip understands these options:
--encrypt
-e Encrypt data. This option may be combined with --symmetric (for output that may be decrypted via a secret key or a passphrase).
--decrypt
-d Decrypt data.
--symmetric
-c Encrypt with a symmetric cipher using a passphrase. The default symmetric cipher used is CAST5, but may be chosen with the
--cipher-algo option to gpg.
--sign
-s Make a signature. See gpg.
--recipient user
-r user
Encrypt for user id user. See gpg.
--local-user user
-u user
Use user as the key to sign with. See gpg.
--list-archive
List the contents of the specified archive.
--output file
-o file
Write output to specified file file.
--gpg gpgcmd
Use the specified command gpgcmd instead of gpg.
--gpg-args args
Pass the specified options to gpg.
--tar tarcmd
Use the specified command tarcmd instead of tar.
--tar-args args
Pass the specified options to tar.
--version
Print version of the program and exit.
--help Display a brief help page and exit.
EXAMPLES
Encrypt the contents of directory 'mydocs' for user Bob to file 'test1':
gpg-zip --encrypt --output test1 --gpg-args -r Bob mydocs
List the contents of archive 'test1':
gpg-zip --list-archive test1
DIAGNOSTICS
The program returns 0 if everything was fine, 1 otherwise.
SEE ALSO
gpg(1), tar(1),
The full documentation for this tool is maintained as a Texinfo manual. If GnuPG and the info program are properly installed at your site,
the command
info gnupg
should give you access to the complete manual including a menu structure and an index.
GnuPG 2.0.15 2010-07-05 GPG-ZIP(1)