Sponsored Content
Full Discussion: script to search a file
Top Forums Shell Programming and Scripting script to search a file Post 302171300 by dr46014 on Thursday 28th of February 2008 05:33:14 AM
Old 02-28-2008
script to search a file

hi all
i have a requirement to write a script which will serach a file in a particuar location for 3 hours from the time when the script is run.if during this period the file arrives in a particular location then this will transmit the file to a other server.please help me writing the script which will search the file in a particular location for 3 hrs.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Search File Script

Nice forum for noobs like me to UNIX. With that said, I need assistance. I am trying to make a script to search files for a specific date and string within the file. Then I need the script to move the file that have the specific date and string to a directory. In the interim I have been manually... (7 Replies)
Discussion started by: I4ce
7 Replies

2. Shell Programming and Scripting

File search for pattern - script

Hi All, I have two directories as 1) mi/job -> job1.sh, job2.sh, job3.sh 2) mi/sysin -> sysin1, sysin2, sysin3,sysin4 I want to wrrite a script such that it should accept two parameters as directory paths. $ myscript mi/sysin mi/job. The script should be able to scan all files... (3 Replies)
Discussion started by: rahulrathod
3 Replies

3. Shell Programming and Scripting

search for the contents in many file and print that file using shell script

hello have a file1 H87I Y788O T347U J23U and file2 J23U U887Y I99U T556U file3 I99O J99T F557J file4 N99I T666U R55Y file5 H87I T347U file6 H77U R556Y E44T file7 Y788O K98U H8I May be using script we can use file1 to search for all the files and have the output H87I file5... (3 Replies)
Discussion started by: cdfd123
3 Replies

4. UNIX for Dummies Questions & Answers

Shell script to search for text in a file and copy file

Compete noob question.... I need a script to search through a directory and find files containing text string abcde1234 for example and then copy that file with that text string to another directory help please :eek: (9 Replies)
Discussion started by: imeadows
9 Replies

5. Shell Programming and Scripting

Script which will search for a file for 15 mins

Hi All, I would like to write a script which will search a file say abc.dat in /a/b/data for 15 mins only. If the script finds the file in 15 mins then it will exit will exit sucessfully and if there is no file for 15 mins it will exit and copy the last day file (abc.dat_ddmmyyhhmmss) from... (1 Reply)
Discussion started by: chandancsc
1 Replies

6. Shell Programming and Scripting

To search a file for a specific word in a file using shell script

Hi All, I have a sql output file has below. I want to get the values 200000040 and 1055.49 .Can anyone help me to write a shell script to get this. ACCOUNT_NO ------------------------------------------------------------ BILL_NO ... (8 Replies)
Discussion started by: girish.raos
8 Replies

7. Shell Programming and Scripting

search within the file in script

Hi all, I have to search a particular folder which conatins around 2000 XML files. I need to identify those files which have a value GSM under Product Value <item name="Product Value"> <value>GSM</value> </item> I need to copy those file names to another file. This is my... (10 Replies)
Discussion started by: Maya_Pillai
10 Replies

8. 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

9. Shell Programming and Scripting

Exclude file from a search script

Hello, I use the following script to delete files from folders. There is an old file I wish to exclude the deletion script. How to exclude a file by name? Current script: ============================= #!/bin/ksh # ---------------------------------------------------- #... (1 Reply)
Discussion started by: pointer
1 Replies

10. Shell Programming and Scripting

Need to search a particular String form a file a write to another file using perl script

I have file which contains a huge amount of data. I need to search the pattern Message id. When that pattern is matched I need to get abcdeff0-1g6g-91g3-1z2z-2mm605m90000 to another file. Kindly provide your input. File is like below Jan 11 04:05:10 linux100 |NOTICE... (2 Replies)
Discussion started by: Raysf
2 Replies
whereami.conf(5)						File Formats Manual						  whereami.conf(5)

NAME
whereami.conf -- configuration file for whereami DESCRIPTION
The whereami.conf file specifies what whereami does on leaving, remaining at or arriving at locations. (Locations are detected by whereami according to specifications in the detect.conf file.) Comments are lines starting with the `#' character. Leading whitespace is ignored on all lines, including comment lines. Other lines are of the form: -location action The action is performed if your system was previously at this location, but is now at another location. =location action The action is performed if your system is now at this location. +location action The action is performed if your system is now at this location, but was previously at another location. !location action The action is performed if your system is not at this location. HELPER SCRIPTS
In addition to the normal commands available within any shell script, whereami includes a number of helper scripts which may be useful. setmailrelay (none | queue [smarthost] | smarthost) Set the mail relay (i.e. smarthost) to "none" if you have a permanent connection, and can send e-mail directly to the recipient's mailserver. If you are not connected, set the relay to "queue" (optionally for a specific smarthost). Or send all mail to a specific smarthost, if that is what you need in this location. setresolver <resolv.conf stanza> The <resolv.conf stanza> should be something like: search localhost mydomain.com nameserver 1.2.3.4 (all on one line) to specify the domain search path and the nameserver to use. If you have resolvconf installed, this script will interface with that to manupulate the /etc/resolv.conf file and control DNS resolution. This is recommended. If you are not using resolvconf, then this will directly rewrite your /etc/resolv.conf file, inserting a section similar to the manner in which DHCP works. setproxy (start | stop | none | <upstream_proxy>) Use this script to reconfigure your local oops or squid proxy server to use a specific upstream proxy, no upstream proxy, or to stop the proxy server completely. The upstream proxy should be specified as "<name or ip> <port>", e.g.: setproxy 192.168.55.3 3128 For a local squid proxy you can optionally also provide a complete set of parameters for the "cache_peer" directive (without the "cache_peer" name itself). See the squid.conf file for full details of this syntax. e.g.: setproxy 192.168.55.3 parent 3128 3140 login=user:password settimezone timezone Use this to set your timezone differently. masqmail_route route_name Use this to reconfigure masqmail to use a different masqmail routing. SEE ALSO
whereami(8), detect.conf(5) Further documentation is available in the /usr/share/doc/whereami directory. FILES
/etc/whereami/whereami.conf The file we are talking about in this here manpage. /etc/whereami/whereiam.sh The script that is built based on the information in this configuration file and then executed by whereami. LIMITATIONS
There should be a configuration program so that the user does not have to do any script programming. AUTHOR
This manual page was written by Andrew McMillan <debian@mcmillan.net.nz> for the Debian GNU/Linux system (but may be used by others). Per- mission is granted to copy, distribute and/or modify this document under the terms of the GPL version 2. whereami.conf(5)
All times are GMT -4. The time now is 01:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy