Quote:
Code:
#!/bin/sh |
Quote:
Thanks so much for all the comments and help from all of you on this. The join command is interesting so I'm glad that was mentioned. I didnt know there is a limitation on for loop in the shell....but apparently there is because the while loop works. |
Quote:
Code:
while read i; do |
Quote:
|
Quote:
Quote:
server1 server2 server3 server4 server5 :cat file2 # out of order server4 server2 :join -v1 file1 file2 server1 server2 server3 server5 Guessing at the algorithm that requires the files to be sorted: file1's server4 and file2's server4 join, but we've already passed server2 in file1, so it's 'wrongly' (for our purposes) skipped when we get to it in file2. :join -v1 <(sort file1) <(sort file2) server1 server3 server5 With the files sorted, we exclude both the joined server4 and server2. (That second example uses process substitution and I don't know if that's supported on Solaris, but it's just an example.) Hope that helps. |
Quote:
|
Well, I was thinking it was system-dependent as well as a shell feature. Refreshing my memory with the bash manual, it states, "Process substitution is supported on systems that support named pipes (FIFOs) or the /dev/fd method of naming open files", so it is but of course Solaris supports named pipes and possibly /dev/fd, too, so that was excessive compatibility paranoia. :)
|
All times are GMT -5. The time now is 03:16 PM. |