Sponsored Content
Full Discussion: Two folder comparison
Top Forums Shell Programming and Scripting Two folder comparison Post 302188216 by ragavhere on Wednesday 23rd of April 2008 02:33:30 AM
Old 04-23-2008
PHP Two folder comparison

Hi era,

I am getting this message and the temp directories are not getting created and the files are not compared.
bash: /usr/local/bin/..: is a directory

The code i used is

mkdir /gdw/shared/qa2/dev/scripts_regr_test/design3/extract_comparison/tmp/dir1 /gdw/shared/qa2/dev/scripts_regr_test/design3/extract_comparison/tmp/dir2
for file in /gdw/shared/qa2/dev/scripts_regr_test/design3/extract_comparison/testing/* /gdw/shared/qa2/dev/scripts_regr_test/design3/extract_comparison/testing1/*; do
egrep -v '^(HDR|FTR)' "$file" | sort >/tmp/"$file"
done
diff -rad /gdw/shared/qa2/dev/scripts_regr_test/design3/extract_comparison/tmp/dir1 /gdw/shared/qa2/dev/scripts_regr_test/design3/extract_comparison/tmp/dir2 | egrep '^(diff|Only in )'


Why is this happening?
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Parse the .txt file for folder name and FTP to the corrsponding folder.

Oracle procedure create files on UNIX folder on a regular basis. I need to FTP files onto windows server and place the files, based on their name, in the corresponding folders. File name is as follows: ccyymmddfoldernamefile.txt; Folder Name length could be of any size; however, the prefix and... (3 Replies)
Discussion started by: MeganP
3 Replies

2. UNIX for Advanced & Expert Users

Auto copy for files from folder to folder upon instant writing

Hello all, I'm trying to accomplish that if a file gets written to folder /path/to/a/ it gets automatically copied into /path/to/b/ the moment its get written. I thought of writing a shell script and cron it that every X amount of minutes it copies these files over but this will not help me... (2 Replies)
Discussion started by: Bashar
2 Replies

3. Windows & DOS: Issues & Discussions

How can I upload a zip folder on a unix path from my windows folder?

Hello, I am an amature at UNIX commands and functionality. Please could you all assist me by replying to my below mentioned querry : How can I upload a zip folder on a unix path from my windows folder? Thanks guys Cheers (2 Replies)
Discussion started by: ajit.yadav83
2 Replies

4. UNIX for Dummies Questions & Answers

Jar/Tar to a diffent folder/same folder w/ filename

Hi, I want to extract myfile.war to a folder which is in the same folder with war file.I did this as normal: jar -xvf myfile.war But it exploded all the content of file to the same level folder instead of that I was expecting to create a folder called myfile. This works with tar: ... (0 Replies)
Discussion started by: reis3k
0 Replies

5. Shell Programming and Scripting

File Management: How do I move all JPGS in a folder structure to a single folder?

This is the file structure: DESKTOP/Root of Photo Folders/Folder1qweqwasdfsd/*jpg DESKTOP/Root of Photo Folders/Folder2asdasdasd/*jpg DESKTOP/Root of Photo Folders/Folder3asdadfhgasdf/*jpg DESKTOP/Root of Photo Folders/Folder4qwetwdfsdfg/*jpg DESKTOP/Root of Photo... (4 Replies)
Discussion started by: guptaxpn
4 Replies

6. Shell Programming and Scripting

do a full comparison of folder contents in script

Hello everyone.... I have a small issue here at work and I am trying to script out a way to automate a fix for it. I have a small number of users (I work in a 1:1 with 6,000 macbooks) that aren't really managed in my deployment. They are managed with a few policies, but the policies are broken... (2 Replies)
Discussion started by: tlarkin
2 Replies

7. Shell Programming and Scripting

Shell scripting for moving folder specific files into target directory of that country folder.

I need help to write shell script to copy files from one server to another server. Source Directory UAE(inside i have another folder Misc with files inside UAE folder).I have to copy this to another server UAE folder( Files should be copied to UAE folder and Misc files should be copied in target... (3 Replies)
Discussion started by: naresh2389
3 Replies

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

9. Shell Programming and Scripting

Delete oldest folder based on folder named as date

Hi, I have a script doing backup to synology server, the script create new folder each day with the date as being folder name i.e. 2018-07-30. Just before creating the new folder I want the script to find the oldest folder from the list and delete it including its content. for example... (3 Replies)
Discussion started by: humble_learner
3 Replies
DYLIBPROF(1)						      General Commands Manual						      DYLIBPROF(1)

NAME
dylibprof - control the shared pc sampling of a dynamic shared library SYNOPSIS
dylibprof [-e | -d] | [-c | -r | -b | -h | -p [-o <file>] <dylib>] DESCRIPTION
Dylibprof along with the server /usr/libexec/profileServer allows shared program counter sampling of a dynamic shared library across all the programs that use the library. To use dylibprof(1), /usr/libexec/profileServer must be running. So first start /usr/libexec/profileServer and leave it running in the back ground: % /usr/libexec/profileServer >& /dev/console & /usr/libexec/profileServer starts up with shared pc sampling disabled. It should not be left running with shared pc sampling enabled if no sampling is being done as every launch of a program that uses the dynamic linker is effected. This is true even to a small extent if there no libraries being sampled. If you need to profile from boot up for all processes then the following line can be added to /etc/bootstrap.conf: server "/usr/libexec/profileServer" services NSProfileServer NSProfileControl; Before any dynamic shared library can be sampled sampling must be enabled as follows: % dylibprof -e It can then later be disabled when no more sampling is to be done with: % dylibprof -d EXAMPLE
To sample the dynamic shared library /System/Library/Frameworks/System.framework/Versions/B/System for example requires the following steps. First create a sample buffer for the library: % dylibprof -c /System/Library/Frameworks/System.framework/Versions/B/System Then begin the sampling: % dylibprof -b /System/Library/Frameworks/System.framework/Versions/B/System After this programs launched using this library will be part of the shared pc sampling. Typically what would be done is to then use the system normally for a number of hours. Then to halt the sampling: % dylibprof -h /System/Library/Frameworks/System.framework/Versions/B/System The profiling output file (a gmon.out file) can be created with: % dylibprof -p -o /tmp/gmon.out /System/Library/Frameworks/System.framework/Versions/B/System Using the profiling output file and the library a profile listing and a time based order file (time.order) can be created with: gprof(1): % gprof -S /System/Library/Frameworks/System.framework/Versions/B/System /tmp/gmon.out When no more sampling for this library is to be done the sample buffer can be removed with: % dylibprof -r /System/Library/Frameworks/System.framework/Versions/B/System The options are: -e Enable shared program counter sampling for dynamic libraries. -d Disable shared program counter sampling for dynamic libraries. -c Create a pc sample buffer for the library. -b Begin sampling for programs subsequently launched using the library. -h Halt sampling for programs subsequently launched using the library. -p Produce a profiling output file (a gmon.out file) for the library. -r Remove the pc sample buffer for the library. -o name Use the file name instead of gmon.out when producing the profiling output file with the -p above. FILES
gmon.out profile output file /var/tmp/profile/profile.XXXXXX the sample buffer file SEE ALSO
gprof(1) Apple Computer, Inc. March 19, 2002 DYLIBPROF(1)
All times are GMT -4. The time now is 08:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy