How can I use my code to gather information from a file in a completely different directory?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How can I use my code to gather information from a file in a completely different directory?
# 1  
Old 10-02-2012
How can I use my code to gather information from a file in a completely different directory?

I need my code to compare two different files that are in two completely different directories, How can I do this?

So for example, my code will look at file1 which is in my home directory, and compare the files with those from file2 that is in /abc/adf/adr/afc/adf/file2... does that make sense?
# 2  
Old 10-02-2012
Code:
diff ~/file1 /some_other_dir/file2

 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Create a shell script to gather user account information and displays the result to administrator

I want to create a shell script to gather user account information and displays the result to administrator. I have created a script but its showing all the information when i search for username like: amit@mx:~$ ./uinfo.sh amit Username : amit User Info ... (2 Replies)
Discussion started by: amit1986
2 Replies

2. Shell Programming and Scripting

Script to Gather data from logs and export to a CSV file

Greetings, After a few hours of trial and error, I decide to ask for some help. I am new to AWK and shell script, so please don't laugh :p I made the below script, to gather data from some logs and have the output into a CSV file : #!/bin/sh #Script to collect Errors ... (9 Replies)
Discussion started by: Yagami_Sama
9 Replies

3. Shell Programming and Scripting

Find: ignore directory completely

Hello, I know find can be prevented from recursing into directories with something like the following... find . -name .svn -prune -a type d But how can I completely prevent directories of a certain name (.svn) from being displayed at all, the top level and the children? I really... (2 Replies)
Discussion started by: nwb123
2 Replies

4. AIX

how to gather HMC information

does somebody know how to gather HMC information? It looks like there is some tool can gather HMC configuration to a html file and make them as a xx.tar.gz file? (2 Replies)
Discussion started by: rainbow_bean
2 Replies

5. AIX

Using NIM to gather system information

Hi, Need help if its possible to use NIM server to gather information. Basically, we need to gather firmware version and oslevel for environment wide servers (these servers are connected thru nim). I understand you can use NIM script resource to trigger the script but don't know if possible to... (3 Replies)
Discussion started by: depam
3 Replies

6. Shell Programming and Scripting

Knowing whether the file has completely SFTP ed

Hi.. Can Anyone out there help me? I need to write a script to convert a file in EDCIDC format to CSV The files will be transfered through sftp to the box. Is there a way to check the file has finished being transfered or still transfering. so that my conversion task will be performed after... (3 Replies)
Discussion started by: ramukandada
3 Replies

7. UNIX for Dummies Questions & Answers

Read directory and fill a file with this information

Hello All, Got a question to make a script what reads a directory and put the file names from that directory in a file with some extra text. ls /tempdir output is: file1.gfh file2.txt file4.zzz these file names (always with an extention) must be placed in a line and written to... (2 Replies)
Discussion started by: ToXiQ
2 Replies

8. Shell Programming and Scripting

Gather File permission during scripting on unix as numbers.

Hi, I have a script with following file permission on box. -rwxr-xr-x 1 root system 15347 Aug 14 15:08 b_reboot.ksh Without calculating or watching at -rwxr-xr-x (permission's) of this above mentioned file. I would like to get the file permission assigned to a file. Basically... (7 Replies)
Discussion started by: ajilesh
7 Replies

9. UNIX for Dummies Questions & Answers

How to find File copied completely or else ...

In Unix, I am having one file getting copied to some directory. Which command will help me ensure, that file is not completely copied to the disk? (2 Replies)
Discussion started by: videsh77
2 Replies

10. UNIX for Dummies Questions & Answers

File/directory information......

Basically i have done created the script below, and it functions ok, it prints the access rights the user has. But i need it to print the group permissions, and other permissions, it would also be helpful if i could print the permissions in numeric form aswell, if it is possible. I have looked in... (50 Replies)
Discussion started by: Makaveli.2003
50 Replies
Login or Register to Ask a Question