12-10-2012
That's the input you want, now show the output you want.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hey guys,
I'm trying to call and modify multiple files inside the for loop, i can't get it to work...
------------------------
AFILE=/dir/a_file.txt
BFILE=/dir/b_file.txt
CFILE=/dir/c_file.txt
ADESTFILE=/dir/a_dest_file.txt
BDESTFILE=/dir/b_dest_file.txt... (6 Replies)
Discussion started by: DeuceLee
6 Replies
2. Shell Programming and Scripting
I have a huge collection of HTML files. They have their own file names with htmlextension. I want to rename each of these files with continuous numbers starting from 1.html till the last count of files. Simply it means that if there are three files like this
abc.html
cdfhg.html
rmbd.htmlthen... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies
3. UNIX for Dummies Questions & Answers
Hello again,
A little while back I got help with creating a command to search all directories and sub directories for files from daystart of day x.
I'm wondering if there is a command that I've overlooked that may be able to search for / write folder names to an output file which ideally... (2 Replies)
Discussion started by: Aussiemick
2 Replies
4. Shell Programming and Scripting
I have an input file with contents like :
1LMXTJJD0W28TX2
1LS1XJGDEVWAC5T
1LK81JVDE2HRNDG
1LMXTJJD0W28TX2
1LS1XJGDEVWAC5T
1LK81JVDE2HRNDG
1LMXTJJD0W28TX2
I need to read each field from the file
pass it to a query:
select count(*) from usage_error where usage_id='$field... (17 Replies)
Discussion started by: Rajesh Putnala
17 Replies
5. Shell Programming and Scripting
Hi guys,
I'm new to the forums and putting my foot in the door with SED and AWK. I was wondering if someone could help me as I think I'm making this harder than it needs to be...
I have a list of folders named as urls, inside these are log files and possibly a 'status' file. I'm trying to get... (6 Replies)
Discussion started by: KakersUK
6 Replies
6. Shell Programming and Scripting
Script for if characters from positions 7-15 are matching with characters from position 211-219 then replace all char from 211-219 with 9 space.
Total length of record is 420. Here is the specification of the data in file.
Position Field Data Type... (5 Replies)
Discussion started by: lancesunny
5 Replies
7. Shell Programming and Scripting
I need to process 4 files having name pattern as followis:-
1) Each file starts with = ABCJmdmfbsjop letters + 7 Digit Number _mm-dd-yyyy-hh-mm-ss-3 Digit Number.data
where ABCJmdmfbsjop :- is alphabet. Each file starts with this ABCJmdmfbsjop alphabet.
7 Digit Number :- Numeric 7 digits.
__:-... (1 Reply)
Discussion started by: lancesunny
1 Replies
8. Shell Programming and Scripting
hi,
i have a requirement to delete all the files from all the directories except some specific directories like archive and log.
for example:
there are following directories such as
A B C D Archive E Log F
which contains some sub directories and files. The requirement is to delete all the... (7 Replies)
Discussion started by: Little
7 Replies
9. Shell Programming and Scripting
Hi,
So i know we use cp -r as a basic to copy folders/files.
I would like this BUT i would like to show the output of the files being copied.
With the amazing knowledge i have i have gone as far as this:
1) find source/* -exec cp -r {} target/ \;
2) for ObjectToBeCopied in `find... (6 Replies)
Discussion started by: Imre
6 Replies
10. Shell Programming and Scripting
Hi,
I need to uncompress sevral tar.gz files that are located insides sevral folders using a shell script.
Folder tree looks like this :
/folder/001
/folder/002
/folder/003 Inside each folder dossier (001,002,003) we can find 1 or several tar.gz files.
I've scripted something... (9 Replies)
Discussion started by: shellX
9 Replies
LEARN ABOUT REDHAT
zipgrep
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 17 February 2002 ZIPGREP(1L)