Sponsored Content
Top Forums Shell Programming and Scripting Bulk find in UNIX at unknown dir location Post 302813363 by busyboy on Monday 27th of May 2013 06:21:55 AM
Old 05-27-2013
one simple solution would be to run a loop and then match the resulting files from within the directory. could be something like

Code:
for numeric in ` cat my_file.csv`
do
echo "Going for $numeric"
ls -l /my_path/my_loc/DEV/RPD10/CPD25/WFM/RK_WFM/OUT/*/CPD25_"$numeric".pdf
if [[ $? -eq "0" ]]; then 
echo "$numeric Found"
else  
echo "$numeric Not Found"
fi
done


Remember you'll have to fulfill the "*" and "CPD25_" variables accordingly, where they need to differ from this code.

Rgs
 

8 More Discussions You Might Find Interesting

1. Programming

To find a existence of a dir within a dir

Hi, I want to find whether a dir "temp" is present inside a dir. It should get a dir a input and search recursively within that directory to check whether temp is present and return 1 or return 0 if it is not present anywhere inside the directory/sub-directory. I know we can use readdir in the... (1 Reply)
Discussion started by: spsenthil
1 Replies

2. UNIX for Dummies Questions & Answers

How to find files whose case is unknown

Hello experts, can you kindly tell me how I can look for a file in unix whose name may contain upper or lowercase letters? E.g. If I know the file contains the name netcool but unsure if its NETCOOL or netcool? Thanks :) (3 Replies)
Discussion started by: mitkapadia
3 Replies

3. Shell Programming and Scripting

Shell scripting for Bulk transports in unix

Hi friends, I would like to trasnport a bulk request in hp-ux for SAP ECC6.0 system, would request you to please send shell script for this. tp addtobuffer <request nos.> sid i want a shell script to run at unix level. Regards XXXXXXXXX (4 Replies)
Discussion started by: mahantysk
4 Replies

4. Shell Programming and Scripting

A script to find dir, delete files in, and then del dir?

Hello!! I have directories from 2008, with files in them. I want to create a script that will find the directoried from 2008 (example directory: drwxr-xr-x 2 isplan users 1024 Nov 21 2008 FILES_112108), delete the files within those directories and then delete the directories... (3 Replies)
Discussion started by: bigben1220
3 Replies

5. Shell Programming and Scripting

what is the find command to find exact dir from the root

I want to find a dir called STOP from the root.so what is the find command. Thanks & Regards Rajkumar (1 Reply)
Discussion started by: rajkumar_g
1 Replies

6. Shell Programming and Scripting

KSH - Find paths of multiple files in CC (dir and sub-dir))

Dear Members, I have a list of xml files like abc.xml.table prq.xml.table ... .. . in a txt file. Now I have to search the file(s) in all directories and sub-directories and print the full path of file in a output txt file. Please help me with the script or command to do so. ... (11 Replies)
Discussion started by: Yoodit
11 Replies

7. Shell Programming and Scripting

Bulk Find and Replace

Hi Friends, I have a directory with a ton of .html files, like this ls -m1 dir 1.html 2.html 3.html 4.html Somewhere in the files, there is a pattern like this 1.html http://unix.com/cgi-bin/task?taskid=12010&task.out 2.html http://unix.com/cgi-bin/task?taskid=11110&task.out... (1 Reply)
Discussion started by: jacobs.smith
1 Replies

8. Shell Programming and Scripting

How to find a existing file location and directory location in Solaris box?

Hi This is my third past and very impressed with previous post replies Hoping the same for below query How to find a existing file location and directory location in solaris box (1 Reply)
Discussion started by: buzzme
1 Replies
Data::Stream::Bulk::Util(3pm)				User Contributed Perl Documentation			     Data::Stream::Bulk::Util(3pm)

NAME
Data::Stream::Bulk::Util - Utility functions for Data::Stream::Bulk VERSION
version 0.11 SYNOPSIS
use Data::Stream::Bulk::Util qw(array); use namespace::clean; # Wrap a list in L<Data::Stream::Bulk::Array> return bulk(qw(foo bar gorch baz)); # return an empty resultset return nil(); DESCRIPTION
This module exports convenience functions for use with Data::Stream::Bulk. EXPORTS
Sub::Exporter is used to create the "import" routine, and all of its aliasing/currying goodness is of course supported. nil Creates a new Data::Stream::Bulk::Nil object. Takes no arguments. bulk @items Creates a new Data::Stream::Bulk::Array wrapping @items. cat @streams Concatenate several streams together. Returns "nil" if no arguments are provided. filter { ... } $stream Calls "filter" on $stream with the provided filter. unique $stream Filter the stream to remove duplicates. Note that memory use may potentially scale to O(k) where k is the number of distinct items, because this is implemented in terms of a seen hash. In the future this will be optimized to be iterative for sorted streams. References are keyed by their refaddr (see "id" in Hash::Util::FieldHash). AUTHOR
Yuval Kogman <nothingmuch@woobling.org> COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Yuval Kogman. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.14.2 2012-02-14 Data::Stream::Bulk::Util(3pm)
All times are GMT -4. The time now is 06:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy