Sponsored Content
Top Forums Shell Programming and Scripting Shell script to copy particular file from directories recursively Post 302760215 by Optimus81 on Wednesday 23rd of January 2013 03:32:21 PM
Old 01-23-2013
Thanks Chubler. your solution did work as expected but am trying change the ouput file name as *_result.txt. I tried to update this line like this but didn't work
Code:
log=$(basename "$dest"_result .cnf).txt

Could you please tell me what am doing is correct in above stmt and if possible can you tell me how to acrchive this generated file (input/output) to someother path. so that if we run this script again it should genreated the new set of input/output file then it should generate new compare result file by comparing pervious result and new result file.

like :
1. generate input/result file (already done by above script)

2. If we run the above script again, it should check if there is any files present in output folder if yes, then move this genereated files to someother location with datetime stamp in the filename(archive) . if no files found then just generate files.

3. from step 2, if new set of results files generated (if files archived), then should compare archived result file to newly genereated result file.
ie, something like this
Code:
sdiff -s old_result_file new_result_file

please do help me on this.

ManyThanks,
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Copy file into directories and sub-directories

Hello- I need to copy a file into multiple directories, and each directory's sub-directories (of which there are 5) Currently, the parent directory is set up like this: dir1 sub-dir1 sub-dir2 sub-dir3 sub-dir4 sub-dir5 dir2 sub-dir1 sub-dir2 sub-dir3 ... (1 Reply)
Discussion started by: penlok
1 Replies

2. UNIX for Dummies Questions & Answers

List directories and sub directories recursively excluding files

Hi, Please help me, how to get all the direcotries, its sub directories and its sub directories recursively, need to exclude all the files in the process. I wanted to disply using a unix command all the directories recursively excluding files. I tried 'ls -FR' but that display files as... (3 Replies)
Discussion started by: pointers
3 Replies

3. Shell Programming and Scripting

Shell script to copy file

Dear all, I have a database with thousands of files with the structure of name is: Filename_hour_year.abc Filename_hour_year_1.abc .............. So what I need is how to write a script that all file with contain the character "_1" will copy to "_2" For example: file name:... (7 Replies)
Discussion started by: hainguyen1402
7 Replies

4. Red Hat

Copy certain file types recursively while maintaining file structure on destination?

Hi guys, I have just been bothered by a fairly small issue for some time now. I am trying to search (using find -name) for some .jpg files recursively. This is a Redhat environment with bash. I get this job done though I need to copy ALL of them and put them in a separate folder BUT I also... (1 Reply)
Discussion started by: rockf1bull
1 Replies

5. Shell Programming and Scripting

Shell script to modify file in several directories

Hi, I want a script shell to automate modifying httpd.conf file for several instances of apache, save httpd.file before changing it, after modifying it and then restart apache. - Replace ServerRoot "xxxx" by ServerRoot "yyyy" of all directories : "... (4 Replies)
Discussion started by: bras39
4 Replies

6. Shell Programming and Scripting

Deleting all files recursively from directories while ignoring one file type

Hi, Seems like I need help again with a problem: I want to delete all files from my lets say "Music" Directory inkluding all of the subfolders except for .mp3 and .MP3 files. I tried it with globalignoring mp3 files, finding and deleting all other files, which resulted in all files... (3 Replies)
Discussion started by: pasc
3 Replies

7. Shell Programming and Scripting

ftp script to copy folders recursively

hi all I want a script that will use ftp to copy folder and sub folders from source server to current server. if i use -r switch then it just copies folders for 5 level. (1 Reply)
Discussion started by: kashif.live
1 Replies

8. Shell Programming and Scripting

Script to copy certain info from several directories

Hi, I am writing a script to copy certain file name in txt file . It is working fine if I provide a single directory name (for example "/eos/uscms/store/user/pooja04//analysis2012/525/data/doubleele/2012/datav1/" ) where those specific files are present ending with *root . But I want to modify... (14 Replies)
Discussion started by: nrjrasaxena
14 Replies

9. Shell Programming and Scripting

Recursively Searcing file in the directories

i have directory dgf in the dgf( some other Sub-dir are there) 00 01 02 03 04 in all the Sub directory there is a SG.csv .. i want the scripts should run one by one Sub-dir and print the result for that particular Sub-dir ..then go to next Sub-Dir and print the result....... please... (6 Replies)
Discussion started by: Aditya.Gurgaon
6 Replies

10. Shell Programming and Scripting

Generic script to recursively cd into directories and git pull

Hi all, I'm trying to write a script to recursively cd into my Git projects and pull them, and will later expand it to build my projects as well. I'm having a bit of trouble with my current script, as I want to supply a command line argument to tell it which branch to check out. I can hard... (2 Replies)
Discussion started by: Cows
2 Replies
texlinks(8)							       teTeX							       texlinks(8)

NAME
texlinks - maintain symbolic links from format to engine SYNOPSIS
texlinks [ OPTIONS... ] DIRECTORIES... DESCRIPTION
texlinks is used to create or recreate symbolic links from formats to engines according to the information in fmtutil.cnf or a file speci- fied with --cnffile. DIRECTORIES is an optional list of directories in which to operate. If no directories are specified the list of directories depends on the --multiplatform option. OPTIONS
--cnffile FILE or -f FILE use file as configuration file (default: fmtutil.cnf) --help or -h show some help text --multiplatform or -m operate in all platform-specific directories (default: operate only in the directory for this platform) --silent or -s silently skip over existing scripts/binaries instead of printing a warning --unlink or -u Unlink previously created symlinks --verbose or -v +set verbose mode on (default: off) FILES
fmtutil.cnf default configuration file SEE ALSO
fmtutil(1), fmtutil.cnf(5) Web page: <http://tug.org/teTeX/> BUGS
None known, but report any bugs found to <tex-k@tug.org> (mailing list). AUTHOR
texlinks was written by Thomas Esser <te@dbs.uni-hannover.de> in 1999. texlinks has been released into the public domain. This manual page was written by C.M. Connelly <c@eskimo.com>, for the Debian GNU/Linux system. It may be used by other distributions with- out contacting the author. Any mistakes or omissions in the manual page are my fault; inquiries about or corrections to this manual page should be directed to me (and not to the primary author). teTeX November 2007 texlinks(8)
All times are GMT -4. The time now is 09:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy