osx - shell script to link specific files up one level -


I have found a folder that has a lot of folders, each containing a movie file. Now I want to be able to see all of these movies once (but I have to preserve the folder structure) so I want to symlink them all in the top level folder (flat view in the directory operator, but I 'I am on Mac) here is my attempt

  in file * / * / *. Mov; Doname = 'echo $ file | | Sed "s | [^ /] * / [^ /] * / || g ''; If the ln -s $ file is resonating $ newname; then <3> on line 3, then fu / bar / Spud.mov is to be converted to spud.mov and then ln -s foo / bar on line 4 /spud.mov spud.mov  

but it is not working, I get it all! / P>

ln: "s | [^ /] / [^ /] / || G: There is no such file or directory.

I have tried many connections and exits, but there is no luck CAD expression works, but I have clearly defined my variable

Thanks

what all the resonance is with $ file ? | Sed or awk stuff, anyway? Created base for this purpose.

  in the file * / * / * .mov; to newname = `basename $ file1 ln -s $ Fi Le $ newname;  

But, in fact, when a directory is given, LN does the same thing:

  in the file * / * / * .mov; Ln -s "$ file"  

Or actually requires a general-purpose version which is enough to call multiple times for LN only:

  find-name \ * .mov -depth +1 -print0 | exerges -0-j% ln-s%  

this is the local directory Find everything by name that ends in .mov in Rtman is not in the directory (depths greater than 1), Separate output with taps and pipes in Xargs, which is looking to tap different input, and will pass. As is the logic of LD after all the arguments that it is read on stdin


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -