The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #7 (permalink)  
Old 03-19-2009
rikxik's Avatar
rikxik rikxik is offline
Registered User
  
 

Join Date: Dec 2007
Posts: 250
Quote:
Originally Posted by protocomm View Post
Thanks for your answers, but i want work with variables and not directly with the file.

With rsync as comm if i give $var instead the directory directly, i have errors...
What are you talking about? You posted example folder1, folder2 so the answers were provided accordingly. What is stopping you from putting the commands in a script, say "compare.sh":

Code:
#!/usr/bin/ksh
f1=$1
f2=$2
dircmp -s $f1 $f2 |grep -v "^ *$" |grep -v Page
Then you can simply pass the arguments to the script:

Code:
ksh compare.sh folder1 folder2
Or I'm completely missing something?