I want to compare the a list of files in two directories quickly. I can use the following
$ ls /opt/myapp/ >> ~/myapplist
$ cksum ~/myapplist
3476215496 7657 /u/compll07/ojblass/myapplist
$ ls /opt/myapp2/ >> ~/myapp2list
$ cksum ~/myapp2list
3476215496 7657 /u/compll07/ojblass/myapp2list
And compare the checksums of the output. I would like to just do a cksum of the output of a command and I have tried
$ cksum `ls /opt/myapp/`
But that doesn't work. Is there a slicker way to do this in one command in ksh?