12-14-2010
#do zip
ZipFiles=`ls | grep -i .zip` > /dev/null
for File in $ZipFiles
do
printf "\nUnpacking: ${File}."
unzip "$File"
done
#do gpg
GPGFiles=`ls | grep -i .gpg` > /dev/null
for File in $GPGFiles
do
printf "\nUnpacking: ${File}."
gpg "$File"
done
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
ZIPGREP(1L) ZIPGREP(1L)
NAME
zipgrep - search files in a ZIP archive for lines matching a pattern
SYNOPSIS
zipgrep [egrep_options] pattern file[.zip] [file(s) ...] [-x xfile(s) ...]
DESCRIPTION
zipgrep will search files within a ZIP archive for lines matching the given string or pattern. zipgrep is a shell script and requires
egrep(1) and unzip(1L) to function. Its output is identical to that of egrep(1).
ARGUMENTS
pattern
The pattern to be located within a ZIP archive. Any string or regular expression accepted by egrep(1) may be used. file[.zip] Path
of the ZIP archive. (Wildcard expressions for the ZIP archive name are not supported.) If the literal filename is not found, the
suffix .zip is appended. Note that self-extracting ZIP files are supported, as with any other ZIP archive; just specify the .exe
suffix (if any) explicitly.
[file(s)]
An optional list of archive members to be processed, separated by spaces. If no member files are specified, all members of the ZIP
archive are searched. Regular expressions (wildcards) may be used to match multiple members:
* matches a sequence of 0 or more characters
? matches exactly 1 character
[...] matches any single character found inside the brackets; ranges are specified by a beginning character, a hyphen, and an end-
ing character. If an exclamation point or a caret (`!' or `^') follows the left bracket, then the range of characters within
the brackets is complemented (that is, anything except the characters inside the brackets is considered a match).
(Be sure to quote any character that might otherwise be interpreted or modified by the operating system.)
[-x xfile(s)]
An optional list of archive members to be excluded from processing. Since wildcard characters match directory separators (`/'),
this option may be used to exclude any files that are in subdirectories. For example, ``zipgrep grumpy foo *.[ch] -x */*'' would
search for the string ``grumpy'' in all C source files in the main directory of the ``foo'' archive, but none in any subdirectories.
Without the -x option, all C source files in all directories within the zipfile would be searched.
OPTIONS
All options prior to the ZIP archive filename are passed to egrep(1).
SEE ALSO
egrep(1), unzip(1L), zip(1L), funzip(1L), zipcloak(1L), zipinfo(1L), zipnote(1L), zipsplit(1L)
URL
The Info-ZIP home page is currently at
http://www.info-zip.org/pub/infozip/
or
ftp://ftp.info-zip.org/pub/infozip/ .
AUTHORS
zipgrep was written by Jean-loup Gailly.
Info-ZIP 28 February 2005 ZIPGREP(1L)