Sponsored Content
Top Forums Shell Programming and Scripting How search a list of numbers from a file Post 302552219 by jayan_jay on Friday 2nd of September 2011 03:11:39 AM
Old 09-02-2011
in case grep -f is not available ..
Code:
$ xargs<file1|sed 's, ,|,g;s,^,egrep \",g;s,$,\" file2,g' | sh

 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Search a list of lines in file into files

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

2. UNIX for Dummies Questions & Answers

how to search and list file with wildcard character

hi, I want to search all files in the current working direcotry and to print in comma (,) seperated output. But I have two patterns to search for. Files will be in ABC20100508.DAT format. Search should happen on the format (ABC????????.DAT) along with date(20100508). I can do a ls... (2 Replies)
Discussion started by: anandapani
2 Replies

3. Shell Programming and Scripting

Script to search a large file with a list of terms in another file

Hi- I am trying to search a large file with a number of different search terms that are listed one per line in 3 different files. Most importantly I need to be able to do a case insensitive search. I have tried just using egrep -f but it doesn't seam to be able to handle the -i option when... (3 Replies)
Discussion started by: dougzilla
3 Replies

4. UNIX for Dummies Questions & Answers

Search String in File List

Hi, I have a list of files which can be identified as abcd*.xml where * represent multiple timestamps for multiple files. I need to do following checks 1. Find number of files (which we get by doing following) FILECOUNT=`ls -ltr /dir/abcd*.xml | wc -l` 2. If check 1 gives '1' as... (2 Replies)
Discussion started by: dsrookie
2 Replies

5. Shell Programming and Scripting

Search only numbers in a file

Hello team, Suppose I have a file named that has following content: abc123 1897 msxi12 ------------ ######## ((((( rapjagc ))))))) 34229 xxxxxxxxxxxx @@@536 I need those lines that contain only numbers from this file. means -- it should eliminate alphanumber, special characters... (3 Replies)
Discussion started by: singhabm
3 Replies

6. Shell Programming and Scripting

List file's name and search string's Line

Hi all, My need is: To list out all the java / jsp files having System.out.println in my project. I need the output as: /home/me/project/file1.java somejavacode somejavacode System.out.println("something"); somejavacode somejavacode somejavacode /home/me/project/file2.java... (8 Replies)
Discussion started by: linuxadmin
8 Replies

7. Shell Programming and Scripting

Take a list if strings from a file and search them in a list of files and report them

I have a file 1.txt with the below contents. -----cat 1.txt----- 1234 5678 1256 1234 1247 ------------------- I have 3 more files in a folder -----ls -lrt------- A1.txt A2.txt A3.txt ------------------- The contents of those three files are similar format with different data values... (8 Replies)
Discussion started by: realspirituals
8 Replies

8. UNIX for Dummies Questions & Answers

How to search & list subdirectories with the given file name

Question: How to search & list subdirectories with the given file name? For example: The directory structure looks like; /Builds/DEV/Build_RL01/DDL/ a_tbl_cre.sql ...... /Builds/DEV/Build_RL01/DML/ a_upd.sql .... .... Requirements: 1. I need to find subdirectory DML which is... (0 Replies)
Discussion started by: Siva SQL
0 Replies

9. Shell Programming and Scripting

Search within file1 numbers from list in file2

Hello to all, I hope somebody could help me with this: I have this File1 (real has 5 million of lines): Number Category --------------- -------------------------------------- 8734060355 3 8734060356 ... (6 Replies)
Discussion started by: Ophiuchus
6 Replies

10. Shell Programming and Scripting

Search string within a file and list common words from the line having the search string

Hi, Need your help for this scripting issue I have. I am not really good at this, so seeking your help. I have a file looking similar to this: Hello, i am human and name=ABCD. How are you? Hello, i am human and name=PQRS. I am good. Hello, i am human and name=ABCD. Good bye. Hello, i... (12 Replies)
Discussion started by: royzlife
12 Replies
LDD(1)							    BSD General Commands Manual 						    LDD(1)

NAME
ldd -- list dynamic object dependencies SYNOPSIS
ldd [-a] [-v] [-f format] program ... DESCRIPTION
The ldd utility displays all shared objects that are needed to run the given program or to load the given shared object. Contrary to nm(1), the list includes ``indirect'' dependencies that are the result of needed shared objects which themselves depend on yet other shared objects. Zero, one or two -f options may be given. The argument is a format string passed to rtld(1) and allows customization of ldd's output. If one is given, it sets LD_TRACE_LOADED_OBJECTS_FMT1. If two are given, they set LD_TRACE_LOADED_OBJECTS_FMT1 and LD_TRACE_LOADED_OBJECTS_FMT2, respectively. See rtld(1) for details, including a list of recognized conversion characters. The -a option displays the list of all objects that are needed by each loaded object. This option does not work with a.out(5) binaries. The -v option displays a verbose listing of the dynamic linking headers encoded in the executable. See the source code and include files for the definitive meaning of all the fields. EXAMPLES
The following is an example of a shell pipeline which uses the -f option. It will print a report of all ELF binaries in the current direc- tory, which link against libc.so.6: find . -type f | xargs -n1 file -F ' ' | grep ELF | cut -f1 -d' ' | xargs ldd -f '%A %o ' | grep libc.so.6 SEE ALSO
ld(1), nm(1), rtld(1) HISTORY
A ldd utility first appeared in SunOS 4.0, it appeared in its current form in FreeBSD 1.1. The -v support is based on code written by John Polstra <jdp@polstra.com> BSD
May 15, 2008 BSD
All times are GMT -4. The time now is 02:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy