Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I need to make a list of files in a directory, and concatinate all the files on the list. I suspect that that a vi command, a script or a pipe could do this but I haven't been able to figure it out. Can someone help point me in the right direction? Here are the steps I have taken so far:
Step One
ls *.avi > list_of_avi.txt
The list_of_avi.txt contents look like this:
apple.avi
baby.avi
candy.avi
Step Two (help needed)
I want to strip the lfd (line feeds) and replace them with a space so that the file looks like this:
apple.avi baby.avi candy.avi
Step 3 (help needed)
cat contents of list_of_avi.txt so that all the files in the directory are put together like this
Why not do it right; install transcode. As part of the package is the avimerge utility. In addition to being able to merge all the avi files easily, it can prevent the audio sync problems that can occur when joining with cat:
Thanks for the quick replies. I have been working with both suggestions since you posted them.
regarding macemoneta's transcode suggestion, this looks like an excellent tool. It fires up and pulls together the individual movies like a charm. The video is great but I can't make the audio work when the avi is played on a window's box even thought the individual constitutent movie clips do play (I am trying to make movies of my kids that the grand parents can just pop in their PC's and play). I suspect that with more work I will figure this tool out and use it alot. It seems really cool.
Regarding the onsolebox's script, it just fires up and works like a charm. I am still working on the output but think that this one will work for my current purposes until I can make the transcode work. In the meantime, this script has taught me a lot about the magic of bash scripts.
Thanks to both for sharing your knowlege. I love to learn which is why I guess I like linux.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.