Writing a script for multiple occurence of IP_Add in 3 diffrent directories .


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Writing a script for multiple occurence of IP_Add in 3 diffrent directories .
# 1  
Old 10-12-2010
Writing a script for multiple occurence of IP_Add in 3 diffrent directories .

Hello members.


How can i write a script to find a multiple occurence of IP_ADD in the 3 different directories and under one path.after finding the IP_add redirect into a text file.
for example
home dir: /fdp/cdg
under home directory there are several files and directories.so I have to extarct the IP's under below directories only and redirect into a text file.

/fdp/cdg/mms
/fdp/cdg/cpd
/fdp/cdg/abs.

so please help me to write a script for the above scenario.Smilie

I am looking forward from you.

Thanks in Advance
Siva Ranganath Ch.
# 2  
Old 10-12-2010
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Open Source

Help with writing Shell Script to automate process using multiple commands

Hello! Need help to write a Linux script that can be run from windows using command/Cygwin/any other way. I am new to scripting, actually i am trying to automate server health check like free disk space, memory along with few services status, if any services is not running then start services ,... (7 Replies)
Discussion started by: Sayed Ibrahim
7 Replies

2. UNIX for Dummies Questions & Answers

Writing a script to print the number of lines in multiple files

Hi I have 1000 files labelled data1.txt through data1000.txt. I want to write a script that prints out the number of lines in each txt file and outputs it in the following format: Column 1: number of data file (1 through 1000) Column 2: number of lines in the text file Thanks! (2 Replies)
Discussion started by: evelibertine
2 Replies

3. Shell Programming and Scripting

Writing an snmp script to grab multiple oids at once

is it possible to grab the following oids with one invocation of the snmp command, instead of having to run separate commands: snmpwalk -v2c -c commst hostname hrStorageUsed snmpwalk -v2c -c commst hostname hrStorageDescr snmpwalk -v2c -c commst hostname hrStorageAllocationUnits ... (2 Replies)
Discussion started by: SkySmart
2 Replies

4. UNIX for Dummies Questions & Answers

Deleting multiple directories inside multiple directories

Hi, Very unfamiliar with unix/linux stuff. Our admin is on vacation so, need help very quickly. I have directories (eg 40001, 40002, etc) that each have one subdirectory (01). Each subdir 01 has multiple subdirs (001, 002, 003, etc). They are same in each dir. I need to keep the top and... (7 Replies)
Discussion started by: kkouraus1
7 Replies

5. UNIX for Dummies Questions & Answers

Writing a loop to process multiple input files by a shell script

I have multiple input files that I want to manipulate using a shell script. The files are called 250.1 through 250.1000 but I only want the script to manipulate 250.300 through 250.1000. Before I was using the following script to manipulate the text files: for i in 250.*; do || awk... (4 Replies)
Discussion started by: evelibertine
4 Replies

6. Shell Programming and Scripting

Writing a Perl Script that processes multiple files

I want to write a Perl script that manipulates multiple files. In the directory, I have files 250.*chr$.ped where * is from 1 to 1000 and $ is from 1-22 for a total of 22 x 10,000 = 22,000 files. I want to write a script that only manipulates files 250.1chr*.ped where * is from 1 to 22.... (10 Replies)
Discussion started by: evelibertine
10 Replies

7. UNIX for Dummies Questions & Answers

Writing a loop to manipulate a script and store it in multiple output files

I have a script where the the 9th line looks like this: $filename=sprintf("250.1chr%d.ped", $N); I want to modify this script 1000 times, changing 250.1chr%d.ped to 250.2chr%d.ped, 250.3chr%.ped.......and so on all the way to 250.1000chr%d.ped and store each output in files called ... (4 Replies)
Discussion started by: evelibertine
4 Replies

8. Shell Programming and Scripting

how to write a script for existing of IP_add in the files under paticular paths.

Hello , I want to write a script to test the IP_add is hardcoded in the paticular files. the files are available in path . for example. /abs/abn/jkg/frames.sh. like this some files are there in the same path.I manually replaced the IP_ADD with domain name in required files.now i have to... (1 Reply)
Discussion started by: rajkumar_g
1 Replies

9. Shell Programming and Scripting

Searching of IP_add in multiple scripts

Hi forum memebers, I want know what is the grep command a IP_add or host in the multiple scripts in one directory. Thanks in advance. Siva Ranganath.:) (3 Replies)
Discussion started by: sivaranga001
3 Replies

10. Shell Programming and Scripting

Searching of IP_add in multiple scripts! ASAP

Hello Friends, Plz help me for below query? I want search the IP_ADD from multiple files which are txt file or .sh files or .xml files which are present in different directories .Iam looking for Forum memebers help. Advance thanks to forum memebers.Plz reply me ASAP?:) (4 Replies)
Discussion started by: sivaranga001
4 Replies
Login or Register to Ask a Question