write shell script to search file in folder


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting write shell script to search file in folder
# 1  
Old 12-01-2010
write shell script to search file in folder

hi ..
i have a problem how to search file with date and version number(ms_2.0_dd/mm/yy_24)in folder.Here 24 is version number and compare the this file to other file which is in another folder and if does not match then copy this file to respective folder.Also copy different files in different folder at booting of system This whole process is done at every boot time of system .
# 2  
Old 12-02-2010
What have you tried so far ?

And could you rephrase your question a little - it's kinda confusing, I'm especially uncertain about

"Also copy different files in different folder at booting of system"

copy everytime ?
copy if files equal?
copy if files unequal?

anway... post where you're at and I'm sure you'll get some pointers
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Request for Shell script to move files from Subfolder to Parent folder and delete sub folder

Hi Team, I am new to shell script and there is a requirement where files should be moved from Subfolder to parent folder. Eg: parent folder --> /Interface/data/test/IN Sub folder -->/Interface/data/test/IN/Invoice20180607233338 Subfolder will be always with timestamp... (6 Replies)
Discussion started by: srivarun15
6 Replies

2. Shell Programming and Scripting

Need help to write a shell script to convert text file to excel file.

Hi Everyone, I want your help to write a script which will take text file as input and on the basis of delimiter ":"script will create excel sheet. Example input: IpAdress:InstanceName:Port:ServerName 10.255.255.1:abc:2232:xyz_abc Output should be an excel sheet like below: Column... (8 Replies)
Discussion started by: akabhinav18
8 Replies

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

4. Shell Programming and Scripting

Need to build Shell Script to search content of a text file into a folder consist several files

Have to read one file say sourcefile containing several words and having another folder containing several files. Now read the first word of Sourcefile & search it into the folder consisting sevral files, and create another file with result. We hhave to pick the filename of the file in which... (3 Replies)
Discussion started by: mukesh.baranwal
3 Replies

5. Shell Programming and Scripting

Write output to a file using Korn shell script

All, Can anyone please help me with the below scenario in korn shell script. Can anyone please give me some hints to proceed on this. I have a Flat file of the below format. Input file format:... (1 Reply)
Discussion started by: sp999
1 Replies

6. Shell Programming and Scripting

write shell script to rename file

hi, I need some help in writing shell script in a bourne shell.I am trying to rename the file.. eg. find /root/data -type f -name "text*) | while read FILES do newfile=${FILES/type_2.0_20101208_34.xml / tmp.xml} mv "$FILES" "$newfile" done above written script is working...If the... (7 Replies)
Discussion started by: shubhig15
7 Replies

7. Shell Programming and Scripting

How to write a shell script to notify when certain texts appear in a file?

I have a server and occasionally the file mysqld.log would show something like /usr/libexec/mysqld: Disk is full writing './example_com_-_wordpress/wp_statpress.MYD' (Errcode: 122). Waiting for someone to free space... Retry in 60 secs How do I write a simple shell script to check mysqld.log... (1 Reply)
Discussion started by: acider
1 Replies

8. Shell Programming and Scripting

shell script for moving all the file from the same folder

Hi , I need a shell script which basicaly moves all the files from one folder say folder x to folder y and once they are moved to folder y a datetimestamp should be attached to there name for ex file a should be moved to y folder and renamed as a_20081015 (1 Reply)
Discussion started by: viv1
1 Replies

9. Shell Programming and Scripting

how to write a shell script that print the last modified file ?

Hi guys, -could any one help me with this (I'm new to UNIX) how to write a shell script that tell me the last modified file in the current directory? so if I run the script in a diferent directory,will work. and can I write the script by C++ language and run it in the shell ? I tried... (5 Replies)
Discussion started by: FunnyWolF
5 Replies

10. Shell Programming and Scripting

i want to write a script to test the folder permissions

Hi All, I want a script to test folder permissions.( to alert me if a folder /abc/xyz does not have 775 permissions). i want to test /abc/xyz is having 775 permissions or not if not it has to alert me. Please help me ASAP Thanks in advance (4 Replies)
Discussion started by: rajesh212512
4 Replies
Login or Register to Ask a Question