Kenneth Whittaker penned:
Try putting quotes around .snapshot/*/NeXT/Apps/Icon.app/help/.list and see what happens.
Why would I want to put quotes around a file specification that contains a wildcard? That would cause it to look for a directory named "*". That is why I have .snapshot/*/"&" in the sed expression.
kenw-sun - 08:00:31 PM - 40 % find * -type f -print | sed -e 's%.*%ls -ldtr "&" .snapshot/*/"&"; echo%' | bash > messed.up.files .snapshot/*/france/snoop.out: No such file or directory .snapshot/*/france/eacces.txt: No such file or directory .snapshot/*/france/er357.tmp_mail: No such file or directory .snapshot/*/france/messed.up.files: No such file or directory
kenw-sun - 08:00:31 PM - 42 % ls -ldtr ".snapshot/*/france/snoop.out" .snapshot/*/france/snoop.out: No such file or directory
Of course - .snapshot contains hourly.?, weekly.?, etc.
I think my question is still a valid one. For example, the following works, even though it does not differ in essence from my original example which does not:
find * -type f -print | \ sed -e 's%.*%ls -ldtr "&" .snapshot/{hourly.{0,1},nightly.{0,1},weekly.{0,1}}/"&"; echo%' | \ bash > messed.up.files
[I have shortened the list of snapshot directories for brevity.]
David Drum wrote:
Hello everyone,
I am quite perplexed by the behavior I am seeing below:
david@vortex ~ $ find * -type f -print | sed -e 's%.*%ls -ldtr "&" .snapshot/*/"&"; echo%' | bash > messed.up.files .snapshot/*/Mail/.dir.tiff: No such file or directory .snapshot/*/NeXT/Apps/.dir.tiff: No such file or directory .snapshot/*/NeXT/Apps/.opendir.tiff: No such file or directory .snapshot/*/NeXT/Apps/Icon.app/brushes/.places: No such file or directory .snapshot/*/NeXT/Apps/Icon.app/help/.places: No such file or directory .snapshot/*/NeXT/Apps/Icon.app/help/.list: No such file or directory ^C david@vortex ~ $ ls -l .snapshot/*/NeXT/Apps/Icon.app/help/.list -rw-r--r-- 1 david staff 1095 Nov 14 1992 .snapshot/hourly.0/NeXT/Apps/Icon.app/help/.list -rw-r--r-- 1 david staff 1095 Nov 14 1992 .snapshot/hourly.1/NeXT/Apps/Icon.app/help/.list -rw-r--r-- 1 david staff 1095 Nov 14 1992 .snapshot/hourly.2/NeXT/Apps/Icon.app/help/.list -rw-r--r-- 1 david staff 1095 Nov 14 1992 .snapshot/hourly.3/NeXT/Apps/Icon.app/help/.list -rw-r--r-- 1 david staff 1095 Nov 14 1992 .snapshot/weekly.0/NeXT/Apps/Icon.app/help/.list
Would anyone care to comment? This is greatly disturbing.
Regards,
David K. Drum david@more.net