You are not logged in.

#1 2009-02-05 23:23:19

ninjaprawn
Member
From: Manchester, UK
Registered: 2008-01-26
Posts: 485

[SOLVED] How to create a text file with entirely from a bash script?

Hi,

I am just making a quick script to convert and burn an avi to dvd. I am just using the basic cli tools, but need to create the.xml file.

The script has already changed to the directory i want to be in, and a just need to create a text file with about 10 lines of text in!
I need to make a fike called dvd.xml and it contain the following;

<dvdauthor>
    <vmgm />
    <titleset>
        <titles>
            <pgc>
                <vob file="video.mpg" />
            </pgc>
        </titles>
    </titleset>
</dvdauthor>

thanks


2007 - Started using Arch Linux as my only/main OS
- Samsung Series 3, Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz - 8Gb DDR3 ram - 700Gb HDD
On board intel Graphics & Sound

Offline

#2 2009-02-05 23:33:28

Pox
Member
From: Melbourne, AU
Registered: 2007-10-04
Posts: 66

Re: [SOLVED] How to create a text file with entirely from a bash script?

cat << _END_ > dvd.xml
<dvdauthor>
    <vmgm />
    <titleset>
        <titles>
            <pgc>
                <vob file="video.mpg" />
            </pgc>
        </titles>
    </titleset>
</dvdauthor>
_END_

Offline

#3 2009-02-06 00:03:48

ninjaprawn
Member
From: Manchester, UK
Registered: 2008-01-26
Posts: 485

Re: [SOLVED] How to create a text file with entirely from a bash script?

thanks for that mate! new it would be simple ish!!


2007 - Started using Arch Linux as my only/main OS
- Samsung Series 3, Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz - 8Gb DDR3 ram - 700Gb HDD
On board intel Graphics & Sound

Offline

Board footer

Powered by FluxBB