02-13-2008
Search for a file and get the next two files
Hi,
My requirement goes like this.
I search for a file using its pattern in a directory. This will be a unique file in that directory. Now i want to get the next two files after the one i find based on time stamp.
e.g.
i search for the file SRSCLAR.IN12345 in a directory.
Now the directory has a list of files. For every SRSCLAR file there will be two corresponding msg and log files. all the 3 have the same time stamp. and these files will appear in this format
Feb 12 15:49 SRSCLAR.IN12345
Feb 12 15:49 invoice_msg_20080212154210.txt
Feb 12 15:49 invoice_log_20080212154210.txt
So i need the next files after SRSCLAR.IN12345 file.
Kindly help.
Thanks,
Sunny.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I need to count the number of files which have a search string, but counting the file only once
if search string is found.
eg: File1: Please note that there are 2 occurances of "aaa"
aaa
bbb
ccc
aaa
File2: Please note that there are 3 occurances of "aaa"
aaa
bbb
ccc... (1 Reply)
Discussion started by: sudheshnaiyer
1 Replies
2. UNIX for Advanced & Expert Users
I have a file (file1) which is like
host1
host2
host3
host4
the list goes on............
Now I want the above lines in files to be compared with files under
/opt/new/
File names are as below:
Dev
Prod
QA
And suppose host1 from file1 is found under Dev(file under /opt/new)... (2 Replies)
Discussion started by: sriram003
2 Replies
3. SuSE
Hello Linux Masters,
I am not a linux expert therefore i need help from linux gurus.
Well i have a requirement where i need to search all files based on first patterns and after seraching all files then serach second pattern in all files which i have extracted based on first pattern.... (1 Reply)
Discussion started by: Black-Linux
1 Replies
4. UNIX for Dummies Questions & Answers
Hi All,
HP-UX oradev3 B.11.11 U 9000/800
I have few files, which contain texts. Now I need to search a pattern across all files and replace to that pattern with new one. For example, I have following files they have, which contain something like abc@abc.com, now I need to search text acorss... (6 Replies)
Discussion started by: alok.behria
6 Replies
5. Shell Programming and Scripting
Hi , Need to shell script to extracts files names and write those to another file in different directory.
input file is
inputfile.txt
abc|1|bcd.dat
123 david123
123 rudy2345
124 tinku5634
abc|1|def.dat
123 jevid123
123 qwer2345
124 ghjlk5634
abc|1|pqr.txt
123 vbjnnjh435
123 jggdy876... (1 Reply)
Discussion started by: dssyadav
1 Replies
6. Shell Programming and Scripting
Hi I have multiple files in a folder and one file which contains a list of files (one on each line). I was to search for a string only within these files and not the whole folder. I need the output to be in the form
File1<tab>string instance 2<tab> string instance 2<tab>string instance 3... (6 Replies)
Discussion started by: pkabali
6 Replies
7. Red Hat
how to find files of particular mask from a folder using shell script.
for example if i have to find whether files having file mask like FILE%N%.csv
ie files like FILE123.csv or files like FILE56.csv
are present in the following folder or not.
l (2 Replies)
Discussion started by: ramsavi
2 Replies
8. Shell Programming and Scripting
Hi,
I am trying to create a shell script in unix platform, hence will need info on how to start and any ideas from you guys. million thx.
Objective: Shell script to search all entries from 1 file(a.out) to all other files and extract the search output to 1 file (c.out).
Situation,
1)... (8 Replies)
Discussion started by: Mr_47
8 Replies
9. UNIX for Dummies Questions & Answers
All,
i have a file text.log:
cover6
cover3
cover2
cover4
other file is abc.log as :
0
0
1
0
Then I have a excel file result.xls that contains:
Name Path Pass
cover2
cover3
cover6
cover4 (1 Reply)
Discussion started by: Anamika08
1 Replies
10. Shell Programming and Scripting
Hello All
I have a pattern.txt file in source directory ((/project/source/) in linux server and data looks like:
123abc17
234cdf19
235ifg20
I have multiple log files in log directory (/project/log/) in linux server and data for one log file looks like:
<?xml version="1.0" processid... (11 Replies)
Discussion started by: pred55
11 Replies
LEARN ABOUT DEBIAN
entagged
ENTAGGED(1) General Commands Manual ENTAGGED(1)
NAME
entagged - Java Audio File Tagger
DESCRIPTION
Entagged provides a convenient way of changing the value of tag fields, either manually, or automatically via the freedb database.
Entagged can also do a lot of organization work. You can rename your files from their tag in any way you like, including complex directory
structures. You can also tag the files from their filename, this avoid copying all the information by hand.
Best of all, Entagged hides all the different format complexity, with one unique interface, you can work with mixed file formats eg. you
can use freedb with a mixed album of WMA, MP3 and OGG files without worrying!
Features
* Support for OGG Vorbis files - MP3 (id3v1 and id3v2 tags) files - FLAC Files - MPC(MP+) Musepack Files - APE Monkey Audio Files - WAV
files
* Handles all files independently of their type (allows to batch files even from mixed types)
* Edit essential tag information (Artist-Album-Title-TrackNb-Comment-Genre-Year) easily
* Rename files from their tag using any of the above infos with any pattern
* Tag files (again using the above fields) from their filename with any pattern
* Pattern can use filename but also directory name, easy to create a well structured audio files repository
* freedb search using automatically computed cddb id's (the way it is meant to be used). Simply select some files that represent an album,
then query and tag.
* freedb search using manually searched cddb id. When entagged can't find any match, you can search freedb for a given artist/album and
find the correct match yourself, then ask entagged to tag the files.
* Supports Multi langage (currently only english,french and spanish) (contributors appreciated)
* Recursive processing of all the above operations, easily !
* Text transformation: capitalize, uppercase roman numerals, lowercase, and more that can be used either while tagging or renaming.
* Separate freedb and audioformats libraries that can be used independently by anyone who want to read and/or write meta data to audio
files
DOCUMENTAION
Please see /usr/share/doc/entagged/readme.html
HOMEPAGE
http://entagged.sourceforge.net/
AUTHOR
This manual page was written by Varun Hiremath <varunhiremath@gmail.com>, for the Debian project (but may be used by others).
October 20, 2006 ENTAGGED(1)