Joining program

Since I was downloading a couple of files that needed to be joined together, I thought that I would write a bash script to do this for me.

The file that I was getting was from a friend whom had created a home movie of his son walking but could not send the whole thing but had to send in parts, he used a program called HJSplit, but I wanted to join them together using just linux command line commands. So after doing that I have done a small bash script that will do a similar task for me every-time without needing to type in a few commands.

# Ian Porter :
# joining program, that will join files together similar to hjsplit.
# get the input values
# if input is equal to 2 parameters then
if [ $# -eq 2 ]
        # ls all of the files that meet the requirements of the 1st parameter
        for i in `ls $input*`;
                echo "Adding file $i to $output"
                cat $i >> $output
        echo "input filename(s) | output filename"
        echo "..."
        echo "example arv arv.avi"
        echo "Please input the searchable filename and the output filename"

If you save that as and then change the execute writes on it

chmod 755

This will allow you to run the program without typing in sh , to use it for example just use

./ files_to_join big_file