Query in linking


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Query in linking
# 1  
Old 08-27-2008
Query in linking

Hey guys,

i have written the folowing grep command to find an ip address from various files and now i have to find the reverse DNS for it.

I wanted to do it via nslookup or host

does someone have any clue about how to do it?

what i tried was

grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' Times.txt || nslookup ip

but it doesnt give any output to me?

i have used piping here...is it not valid?
# 2  
Old 08-27-2008
using || for piping? it should be |
# 3  
Old 08-27-2008
And of course nslookup doesn't read the host names from standard input. Try xargs (or look here).
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell Script to execute Oracle query taking input from a file to form query

Hi, I need to query Oracle database for 100 users. I have these 100 users in a file. I need a shell script which would read this User file (one user at a time) & query database. For instance: USER CITY --------- ---------- A CITY_A B CITY_B C ... (2 Replies)
Discussion started by: DevendraG
2 Replies

2. Shell Programming and Scripting

Query Oracle tables and return values to shell script that calls the query

Hi, I have a requirement as below which needs to be done viz UNIX shell script (1) I have to connect to an Oracle database (2) Exexute "SELECT field_status from table 1" query on one of the tables. (3) Based on the result that I get from point (2), I have to update another table in the... (6 Replies)
Discussion started by: balaeswari
6 Replies

3. UNIX for Dummies Questions & Answers

is linking possible?

how would i link 2 files together? is it the same as copying? (1 Reply)
Discussion started by: trob
1 Replies

4. Shell Programming and Scripting

add the output of a query to a variable to be used in another query

I would like to use the result of a query in another query. How do I redirect/add the output to another variable? $result = odbc_exec($connect, $query); while ($row = odbc_fetch_array($result)) { echo $row,"\n"; } odbc_close($connect); ?> This will output hostnames: host1... (0 Replies)
Discussion started by: hazno
0 Replies

5. Solaris

linking in solaris9

at the end of the compilation in solaris 9. it is showing link error. like..... ld: fatal: library -lgthread-2.0 not found failed to create the binary the library is in /usr/lib and in /usr/local/lib the lib file is present --->libgthread.2.0.so ......etc if i remove... (3 Replies)
Discussion started by: biswajithit
3 Replies

6. AIX

Linking query in AIX

Hi, Can we link to 2 libraries out of which one is compiled with version 5 and other with version 6. version 6 used AIX 5.0 Version 5 used AIX 4.3 Will there be any runtime problems because of this ( If it goes through linking step )? Thanks , Suman (2 Replies)
Discussion started by: suman_jakkula
2 Replies

7. Programming

Linking with gcc

Forgive as I am new to the gcc compiler and to linux. I am trying to compile/link a program for the first time and am receiving an error complaining about the crtbegin.o file. I use the -v option and get the following: Using built-in specs. Configured with: ../configure --enable-threads=posix... (1 Reply)
Discussion started by: jbeauchamp
1 Replies

8. Programming

Linking problem while linking to shared library

Hi I'm getting ld: fatal: option -h and building a dynamic executable are incompatible ld: fatal: Flags processing errors When I run ld -shared -L/usr/dt/lib -lDtSvc -o builtin.so Workspace.o after running gcc -fPIC -I/usr/X11R6/include -I/usr/dt/include -c Workspace.c I'm... (6 Replies)
Discussion started by: laho
6 Replies

9. UNIX Desktop Questions & Answers

Linking Directories...

Hi there, I am very new to UNIX. Currently, I am running Mac OS X. I set up a FTP server on my computer so that I can transfer files back and forth between my computer at home and at work. All my data and files are located in a directory in another drive, but when I log in, I would be in my... (3 Replies)
Discussion started by: floppiless
3 Replies
Login or Register to Ask a Question